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
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