I am working on an MS Access db which is to be used in Lithuania where the standard date format is yy.mm.dd (thus the system date format is set to this). One problem I am having is when using sql statements in VBA where the criteria is a date I get an error as SQL doesnt seem to like period separators in dates.
For example if I use the following (myVarDate gets it's value from the Date Picker on a form)
me.recordsource = "Select * from MyTable where MyDate = #" & myVarDate & "#"
If myVarDate = 13.09.27 the statement causes an error
If myVarDate = 13/09/27 then it is OK
I've tried formatting the date to force forward slash separators but this still returns period separators. The only solution I've found is to use the Replace function to change the periods into slashes and this works.
However I just wondered if anyone had any experience of this and had found any better solutions.