i am populating and filtering a list via vba OnLoad of a form
I was using Access 2013 but had to move to a machine running Access 2007. The database is now running in Access 2007 and has 'suddenly' started flipping dates around and I do not understand how to stop that from happening.
Debug.Print me.list0.Rowsource shows the date correctly in the sql as dd/mm/yyyy, but as soon as it is pasted into a query, the date is flipped around to mm/dd/yyyy
I have tried to format the date
But again, even though it is OK when debug.print it is flipped around when pasted into a query.
How do I force the date to remain formatted the way I want it and execute in the query correctly or do I have to stick with formatting the date to US and then executing it?
Also, is this something to do with moving from 2013 - 2007 and a setting that I have missed?
I was using Access 2013 but had to move to a machine running Access 2007. The database is now running in Access 2007 and has 'suddenly' started flipping dates around and I do not understand how to stop that from happening.
Code:
SELECT * FROM tblTest WHERE tblTest.ActivationDate <#" & me.text9 & #"
Debug.Print me.list0.Rowsource shows the date correctly in the sql as dd/mm/yyyy, but as soon as it is pasted into a query, the date is flipped around to mm/dd/yyyy
I have tried to format the date
Code:
SELECT * FROM tblTest WHERE tblTest.ActivationDate <#" & Format(me.text9, "dd/mm/yyyy") & "#"
But again, even though it is OK when debug.print it is flipped around when pasted into a query.
How do I force the date to remain formatted the way I want it and execute in the query correctly or do I have to stick with formatting the date to US and then executing it?
Also, is this something to do with moving from 2013 - 2007 and a setting that I have missed?