How to cheat with Microsoft Access and Australian Date DLookups

How to cheat with Microsoft Access and Australian Date DLookups

Many Australian programmers know that Access handles dates by default in the US date format, and this can be a pain when trying to use DLOOKUP to find data.

An easy way to cheat is to create a field called “IndexDate” in your query, and set it to be
IndexDate: Format([YourDate],"#")

This IndexDate field then contains the excel-style five digit date number.

You can then use that in your Dlookup:

MyField: DLookUp("[Field]","TableName","[Date] = " & [IndexDate])

Leave a Reply

Your email address will not be published.