DateTime Format

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;_
 
G

Guest

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])
 
M

Michel Walsh

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top