Go4Expert (http://www.go4expert.com/)
-   MS Access (http://www.go4expert.com/forums/ms-access-forum/)
-   -   print report (http://www.go4expert.com/forums/print-report-t2447/)

Gostap 5Jan2007 20:10

print report

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


ever_thus 12Jan2007 22:20

Re: print report
It's actually not such a stupid question. You'd think a clause like:


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

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

WHERE (table.date > #1/1/2007# AND table.date < #1/2/2007) OR table.date = #1/1/2007

Gostap 13Jan2007 03:16

Re: print report
I'm grateful, thank you very much, I will try it.



All times are GMT +5.5. The time now is 03:40.