print report

Gostap's Avatar, Join Date: Jan 2007
Newbie Member
Hi;

Probably a stupid question from a newbie;
I have a form with several test results taken during a 24-hour priod.
Each test has a field with time format like this: yyyy-mm-dd hh:mm. (not primary key)
I want to print a report based on the data in to modes.
First one, specified by one particular time e.g. 2006-12-19 22:37.
That’s no problem. next one, I want to print out every report during one 24-hour period.
e.g. 2006-12-20 06:30
2006-12-20 15:32
2006-12-20 71:15

i.e. all report chosen by a specific date without any consideration to the time. I understand I have to format date somehow in VB but how? it will not work for me.

hope somebody have mercy 

Best Regards

Gostap
0
ever_thus's Avatar, Join Date: Jan 2007
Contributor
It's actually not such a stupid question. You'd think a clause like:

Code:
WHERE table.date = #1/1/2007#
would return all entries for that date, but it only returns entries where the time is undefined.

What you're going to have to do is
Code:
WHERE table.date > #1/1/2007# AND table.date < #1/2/2007
If you have dates without the time defined iut won't return them. In that case you need to write
Code:
WHERE (table.date > #1/1/2007# AND table.date < #1/2/2007) OR table.date = #1/1/2007
0
Gostap's Avatar, Join Date: Jan 2007
Newbie Member
I'm grateful, thank you very much, I will try it.

BG

Gostap