(Q) I'm having problems dealing with dates in my queries/SQL
code. My regional settings are in the format #dd/mm/yyyy# and it
doesn't work in Access.
(A) VBA assumes automatically that any dates being used
follow US Settings, ie #mm/dd/yyyy#. Use the Format function to
return the correct date.
Global Const JetDateTimeFmt = "\#mm\/dd\/yyyy hh\:nn\:ss\#;;;\N\u\l\l"
Global Const JetDateFmt = "\#mm\/dd\/yyyy\#;;;\N\u\l\l"
Global Const JetTimeFmt = "\#hh\:nn\:ss\#;;;\N\u\l\l"
and then
SQL = SQL & "When >= " & Format$(Now, JetDateTimeFmt) |