Re: open recordset sort order
From: Nikos Yannacopoulos (nyannacoREMOVETHISBIT_at_in.gr)
Date: 03/12/04
- Next message: MacALF: "RE: capture the current user"
- Previous message: CN: "open recordset sort order"
- In reply to: CN: "open recordset sort order"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 12 Mar 2004 10:40:00 +0200
The trick is to use an SQL query rather than the table itself in the
recordset definition, and do the sorting in the query, e.g.
strSQL = "SELECT * FROM MyTable ORDER BY MyField"
set rst = CurrentDb.OpenRecordset(strSQL)
HTH,
Nikos
"CN" <anonymous@discussions.microsoft.com> wrote in message
news:b88401c40803$77d5c940$a501280a@phx.gbl...
> Is there a way that I can sort the results that the
> records are returned when using CurrentDb.OpenRecordset
> ("MyTable").
>
> I have a field in 'MyTable' that I want to use to drive
> this sort order so I can loop through the record set based
> on that field.
>
> Any ideas would be really appreciated. Thx!
>
- Next message: MacALF: "RE: capture the current user"
- Previous message: CN: "open recordset sort order"
- In reply to: CN: "open recordset sort order"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|