A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Sort by date field



 
 
Thread Tools Display Modes
  #1  
Old April 10th, 2010, 09:57 PM posted to microsoft.public.access.forms
Richard
external usenet poster
 
Posts: 1,419
Default Sort by date field

I am using Windows XP and Access 2000.

I have two tables Tbl-TrainingWaiting and Tbl-TrainingSchedule.

I have a form called Frm-TrainingWaiting which has the table
Tbl-TrainingWaiting as the Record Source.

I use =TRACourse1.Column(1) in the Control Source of a text box to display
the date held in the Tbl-TrainingSchedule table.

I am trying to make the form Frm-TrainingWaiting sort on the date field.

Can this be done?

Thanks you in advance for any help.

Richard
  #2  
Old April 11th, 2010, 02:33 AM posted to microsoft.public.access.forms
PvdG42
external usenet poster
 
Posts: 66
Default Sort by date field


"Richard" wrote in message
...
I am using Windows XP and Access 2000.

I have two tables Tbl-TrainingWaiting and Tbl-TrainingSchedule.

I have a form called Frm-TrainingWaiting which has the table
Tbl-TrainingWaiting as the Record Source.

I use =TRACourse1.Column(1) in the Control Source of a text box to display
the date held in the Tbl-TrainingSchedule table.

I am trying to make the form Frm-TrainingWaiting sort on the date field.

Can this be done?

Thanks you in advance for any help.

Richard


Can you not add an "Order By" clause to the query that populates the form?


  #3  
Old April 11th, 2010, 07:00 PM posted to microsoft.public.access.forms
Richard
external usenet poster
 
Posts: 1,419
Default Sort by date field

Thanks Pvd

The form is based on the Tbl-TrainingWaiting table. If I try to use a query
that joins Tbl-TrainingWaiting and Tbl-TrainingSchedule the form doesn't
allow changes. Which I need to be able to do.

But, because I am not joining the two tables in a query, I'm guessing I
can't reference the date field in Tbl-TrainingShedule table to use in OrderBy.

Richard

"PvdG42" wrote:


"Richard" wrote in message
...
I am using Windows XP and Access 2000.

I have two tables Tbl-TrainingWaiting and Tbl-TrainingSchedule.

I have a form called Frm-TrainingWaiting which has the table
Tbl-TrainingWaiting as the Record Source.

I use =TRACourse1.Column(1) in the Control Source of a text box to display
the date held in the Tbl-TrainingSchedule table.

I am trying to make the form Frm-TrainingWaiting sort on the date field.

Can this be done?

Thanks you in advance for any help.

Richard


Can you not add an "Order By" clause to the query that populates the form?


.

  #4  
Old April 11th, 2010, 07:03 PM posted to microsoft.public.access.forms
Richard
external usenet poster
 
Posts: 1,419
Default Sort by date field

Sorry. I've tried using Order By in the SQL as well. It doesn't work.

SELECT [Tbl-Schedule].Course, [Tbl-Schedule].CourseID,
[Tbl-Schedule].MainDate, [Tbl-Schedule].StartTime, [Tbl-Schedule].EndTime,
[Tbl-Schedule].Trainer, [Tbl-Schedule].Duration, [Tbl-Schedule].Room,
[Tbl-Schedule].Hold FROM [Tbl-Schedule] WHERE [Tbl-Schedule].MainDateNow()-1
ORDER BY [Tbl-Schedule].MainDate DESC;

"PvdG42" wrote:


"Richard" wrote in message
...
I am using Windows XP and Access 2000.

I have two tables Tbl-TrainingWaiting and Tbl-TrainingSchedule.

I have a form called Frm-TrainingWaiting which has the table
Tbl-TrainingWaiting as the Record Source.

I use =TRACourse1.Column(1) in the Control Source of a text box to display
the date held in the Tbl-TrainingSchedule table.

I am trying to make the form Frm-TrainingWaiting sort on the date field.

Can this be done?

Thanks you in advance for any help.

Richard


Can you not add an "Order By" clause to the query that populates the form?


.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:37 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.