Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Order By help. Nulls make new record appear first after requery 1

Status
Not open for further replies.

UHNSTrust

Technical User
Dec 2, 2003
262
GB
Hi have forms set up with a button to add a new record. This is fine except the users want the records sorted in a particular order.

They want the records sorted by a date field. This is no problem except when a new record is added and the form is requeried to include the record. Because the order by is set to ascending on the date field any new record has a value of null which is put first. I need the new record at the end but the other completed records ordered by the date field.

Can anybody help? If this does not make sense then please ask for clarification.

Thanks in advance

Jonathan
 
ORDER BY Nz([date field],#2049-12-31#)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks PH. Exactly what I was looking for. A star for you.

Jonathan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top