I have an unbound text box on my Access 2010 Form that has the default value of: =DateSerial(Year(Now()),Month(Now()),1)-1
This gives me the first day of the current month minus one...basically giving me the last day of the previous month. It is formatted as mm/dd/yyy. This shows up correctly on the form; however, when I enter the criteria in a query to pull the data in this text box from my form...it drops the leading zero from the month and day and does not recognize the formating. How do I create a work around?
For Example: on the form it may read 03/31/2011, but in the query it is looking for 3/31/2011.
So if I do a =Left([MyDateTextBox],2) in my query it shows 3/ rather than 03.
Thank you for your help.
This gives me the first day of the current month minus one...basically giving me the last day of the previous month. It is formatted as mm/dd/yyy. This shows up correctly on the form; however, when I enter the criteria in a query to pull the data in this text box from my form...it drops the leading zero from the month and day and does not recognize the formating. How do I create a work around?
For Example: on the form it may read 03/31/2011, but in the query it is looking for 3/31/2011.
So if I do a =Left([MyDateTextBox],2) in my query it shows 3/ rather than 03.
Thank you for your help.