Gordon
Gordon
- Local time
- Today, 20:30
- Joined
- Nov 25, 1999
- Messages
- 34
I have created a query which gives me the date and time of events. Now I want to create a crosstab query which summarizes those events according to whether they occurred in the morning, afternoon or evening.
This would be along the lines:
00:01 - 12:00 -- Morning
12:01 - 1800 - Afternoon
18:01 - 24:00 - Evening
My inital thought was to add a field in the base query which referenced the "time" field, and used an "if," statement.... along the lines of:
morning_Afternoon: IF([TIME]<=12,"Morning","Afternoon").
I get an error message when I try this, which says I have an "undefined IF," expression.
If I can do this through queries/macros and/or reports (rather than VBA) that would be my preference, but I'm open to any ideas!
Thanks for any help!
Gordon
This would be along the lines:
00:01 - 12:00 -- Morning
12:01 - 1800 - Afternoon
18:01 - 24:00 - Evening
My inital thought was to add a field in the base query which referenced the "time" field, and used an "if," statement.... along the lines of:
morning_Afternoon: IF([TIME]<=12,"Morning","Afternoon").
I get an error message when I try this, which says I have an "undefined IF," expression.
If I can do this through queries/macros and/or reports (rather than VBA) that would be my preference, but I'm open to any ideas!
Thanks for any help!
Gordon