Hi,
I'm using Access 2013 on a Windows 10 PC.
I have a Form with txtStartDate and txtEndDate controls with a datasheet subform that I want to filter using those dates.
It also has a button, cmdUpdate, that has a Macro associated with it.
I have set the macro to SetTempVars for the txtStartDate and txtEndDate called tmpStartDate and tmpEndDate.
I have been attempting to use tmpStartDate and tmpEndDate in the criteria of a Date field in a query to filter the data. (Using "Between")
It would not work and finally I decided to see what the Temporary Variables were returning. So, in the macro I made a Message Box to display the tmpStartDate and tmpEndDate.
The result has me puzzled. Instead of displaying the values of txtStartDate and txtEndDate, the Message box displays just a Year for each, that does not seem to be related to anything.
For example, when the txtStartDate is 2015-08-05 and the txtEndDate is 2015-08-30, the message box displays the tmpStartDate as 2002 and the tmpEndDate as 1997.
I have used TempVars in the criteria of queries before, so I don't understand what is wrong. This is the first time I've tried it with Windows 10. Could this be a Windows 10 date issue?
Does anyone have any suggestions? I'd appreciate any help.