From: Richard on
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
From: PvdG42 on

"Richard" <Richard(a)discussions.microsoft.com> wrote in message
news:560D5293-F2B4-4FA9-B529-A5C7B7866519(a)microsoft.com...
> 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?


From: Richard on
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" <Richard(a)discussions.microsoft.com> wrote in message
> news:560D5293-F2B4-4FA9-B529-A5C7B7866519(a)microsoft.com...
> > 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?
>
>
> .
>
From: Richard on
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].MainDate>Now()-1
ORDER BY [Tbl-Schedule].MainDate DESC;

"PvdG42" wrote:

>
> "Richard" <Richard(a)discussions.microsoft.com> wrote in message
> news:560D5293-F2B4-4FA9-B529-A5C7B7866519(a)microsoft.com...
> > 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?
>
>
> .
>