My first post! Glad to have found such an exceptional forum.
I am trying to figure out how to get a query that was designed to show data from 1 or more days from time 1 to time 2 to show data from date 1, time 1 to date 2, time 2 and I'm stumped.
I got as far as getting day 1, time 1 to day 2 (end of day) but I can't seem to get the second day's hour to work. As soon as I add this in to the criteria, I get a blank.
The query is pulling in data from 3 tables with linked primary values. The date field is from one table and the hour is from the other. The application is to change a shift report at a plant from reporting the 24 hours in a single day to report from 6 am one day to 6 am the next day. Of course we will expand it once we get this running to virtual any time period they want but I have to get past the first step.
The pre-existing criteria was:
date field criteria: >=[Forms]![DATE DEFAUT]![date de début] And <=[Forms]![DATE DEFAUT]![date de fin]
HEURE field criteria: >=[Forms]![DATE DEFAUT]![heure de début] And <=[Forms]![DATE DEFAUT]![heure de fin]
These criteria of course will work on multiple days but only for a fixed range of time within each day, not across multiple days. Also, I was using fixed dates and times in place of these variables to get the results I spoke of earlier. The variables above are coming from a form with unbound fields when the print report button is pushed and passes the variable data to the report that calls the query I'm working on.
Is it possible to get this data out with just simple criteria (I'm doubting it is) and if not what is your opinion about the best methodology to use to change this. If it's just a criteria thing I've missed, what am I not doing correctly?

I am trying to figure out how to get a query that was designed to show data from 1 or more days from time 1 to time 2 to show data from date 1, time 1 to date 2, time 2 and I'm stumped.
I got as far as getting day 1, time 1 to day 2 (end of day) but I can't seem to get the second day's hour to work. As soon as I add this in to the criteria, I get a blank.
The query is pulling in data from 3 tables with linked primary values. The date field is from one table and the hour is from the other. The application is to change a shift report at a plant from reporting the 24 hours in a single day to report from 6 am one day to 6 am the next day. Of course we will expand it once we get this running to virtual any time period they want but I have to get past the first step.
The pre-existing criteria was:
date field criteria: >=[Forms]![DATE DEFAUT]![date de début] And <=[Forms]![DATE DEFAUT]![date de fin]
HEURE field criteria: >=[Forms]![DATE DEFAUT]![heure de début] And <=[Forms]![DATE DEFAUT]![heure de fin]
These criteria of course will work on multiple days but only for a fixed range of time within each day, not across multiple days. Also, I was using fixed dates and times in place of these variables to get the results I spoke of earlier. The variables above are coming from a form with unbound fields when the print report button is pushed and passes the variable data to the report that calls the query I'm working on.
Is it possible to get this data out with just simple criteria (I'm doubting it is) and if not what is your opinion about the best methodology to use to change this. If it's just a criteria thing I've missed, what am I not doing correctly?
Last edited: