Sort on date field

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
 
J

John W. Vinson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top