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;_
Ofer Cohen - 12 Jul 2006 23:38 GMT
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])

Signature
Good Luck
BS"D
> 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
[quoted text clipped - 5 lines]
> 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;_
Michel Walsh - 12 Jul 2006 23:45 GMT
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
> I'm using access to query a SQL database. One of the fields in the
> database
[quoted text clipped - 11 lines]
> boxes
> are formatted as a short date with an input mask of 99/99/0000;0;_