DateTime Format

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm using access to query a SQL database. One of the fields in the database
[trddate] uses the datetime format. If I use the following format in my
query selection I'm ok. BETWEEN '5/1/2006' AND '5/26/2006'. If I try to use
a form to make a query selection ie. Between [Forms]![Date
Selection]![Starting Date] And [Forms]![Date Selection]![Ending Date] - I get
an error that says your entry cannot be converted to a valid date time value.
Do I have syntax problems within the query and/or do I have format problems
with the unbound box in my form. The [Starting Date] and [Ending Date] boxes
are formatted as a short date with an input mask of 99/99/0000;0;_
 
What happen when you try converting the date fields to date?

Between CVDate([Forms]![Date Selection]![Starting Date]) And
CVDate([Forms]![Date Selection]![Ending Date])
 
Hi,


You may try to use


Between CDate( [Forms]![Date Selection]![Starting Date] ) And CDate(
[Forms]![Date Selection]![Ending Date] )


Hoping it may help,
Vanderghast, Access MVP
 
Back
Top