query between yesterday and today

Glad we got there, it's often the simple things that trip us up. :)

Brian
 
hey brian,

ran into a little dilema when i come on shift at 2000hrs i have to go in and change my query then at midnight change it back is there a way to put a if statement or something in the query so for instance if the date was before midnight run the query one way and if after run another. i know im probably reaching.
 
Sorry for the delay in responding but I only work Mon Tue Wed.
I would tackle this by running the query from a form as I suggested earlier, and input the dates and times required via the Form thus giving total flexibilty admittedly at the cost of inputting the dates and times each time.

Brian
 
Hi again
had abit of time on my hands so revisited this and yes you can achieve what you want, in the attached I have assumed that your criteria is if time > 20:00:00 then dates required are Date() and Date()+1 else Date()-1 and Date(). Ckeckout properties of text boxes for what I've done. You can still manually enter dates and times to cover any unusual circumstances.

Of course you could have solved all your problems by now :)

Brian
 

Attachments

Users who are viewing this thread

Back
Top Bottom