Sort on date field

  • Thread starter Thread starter John F.
  • Start date Start date
J

John F.

Hi!
I'd like the table on which my form uses to be sorted by a date field in
descending order whenever it becomes active.

In the form's 'Current' method I've tried this code but the compiler doesn't
like the last line:

Dim rst As Recordset
'Open on last record (most recent data entry)
Set rst = Me.Recordset
rst.Sort = "#"&Servicedate&"# DESC"

Can someone please help straighten this out?

Thank you.

johno
 
Hi!
I'd like the table on which my form uses to be sorted by a date field in
descending order whenever it becomes active.

A Table HAS NO ORDER. If you want to display the records on the form in
chronological order, simply base the form - not on a table - but on a Query
sorting the records appropriately.
 
Back
Top