Try this one
SELECT * FROM Orders WHERE (Orders.dateofreceipt>text1.text .and. Orders.dateofreceipt<text2.text)
make sure text1.text and text2.text are properly formatted to reflect dates.
Printable View
Try this one
SELECT * FROM Orders WHERE (Orders.dateofreceipt>text1.text .and. Orders.dateofreceipt<text2.text)
make sure text1.text and text2.text are properly formatted to reflect dates.
You can use Between...And in Access as well. Don't forget to include the date literal characters #! Check out the help topic on Between...And in Access and have a look at the Example - that will give you what you want.
Cheers,
Paul.
Hi,
If you're building in Access and thus running the queries within access why not build the query in "design"-mode?
You just add the needed tables;
then drag the needed fields;
right click in the "criteria" field and select "build..." (or something like that)
click "BETWEEN"
Select the first field
click "AND"
select the second field
click OK
that should also work.
You can than look in "SQL"-mode for the correct SQL-statement!
regards,
visual sander