[AccessD] Date Format Not Working

Rocky Smolin rockysmolin at bchacc.com
Sat Jun 27 11:29:53 CDT 2015


Dear List:
 
I'm having a problem with a date conversion.  
 
I have two unbound text boxes holding a date range  - txtFromDate and
txtToDate.  They are formatted Long Date in the property sheet.
 
When I need to filter the form to show only records in that date range, I
need to convert it to a short date bracketed by # and embed in a SQL
statement as part of the form filter.
 
But whether I use Format(Me.txtFromDate,"Short Date") or
format(Me.txtFromDate,"mm/dd/yy") the result is still the Long Date format
which the Me.Filter chokes on.
 
Mysterious - I cannot figure out why  Format(Me.txtFromDate,"Short Date")
doesn't convert the date in the text box to mm/dd/yy format.
 
MsgBox Format(Me.txtFromDate, "Short Date") still shows Tuesday June 14,
2015 and it ends up that way in the Filter which don't work.
 
txtToDate behavior is the same.

 
Any clues?  What am I missing/doing wrong?
 
MTIA
 
Rocky Smolin
Beach Access Software
858-259-4334
www.bchacc.com <http://www.bchacc.com/> 
www.e-z-mrp.com <http://www.e-z-mrp.com/> 
Skype: rocky.smolin
 


More information about the AccessD mailing list