Sub Reports with Between

Thecherub

Man with a Mission
Local time
Today, 12:50
Joined
Jan 14, 2004
Messages
92
Sub Reports with Bettween

I have 2 subreports from Querries that use a Between[start Date]And [end date]. so far it's working fine but is there a way to have the report only ask for the Date once. It currently ask's me twice.

I know that it is asking for each subreport. do i need to put a non visable field in the main report to select the date range?

i'm guessing here.
 
Instead of letting the query prompt for the dates with popup boxes, create a form with two text boxes where you neter the date. Then, in the queries, set the criteria for the dates to reference the boxes on the form.
 
Kraj said:
Instead of letting the query prompt for the dates with popup boxes, create a form with two text boxes where you neter the date. Then, in the queries, set the criteria for the dates to reference the boxes on the form.

That sounds very Pretty. I'll try it.

I got things to work however with my own answer the non-visable date field in the Main report works. considering my users K.I.S.S. is the only way to go. :rolleyes:
 
Ok lets try this

Kraj said:
Instead of letting the query prompt for the dates with popup boxes, create a form with two text boxes where you neter the date. Then, in the queries, set the criteria for the dates to reference the boxes on the form.

Ok my idea did'nt work like i thought it would.

How does one set up the code in the form and the Query?

I think i know how to set up the form but I don't know how to have that feed into the Queries, It would have to feed in to each subreport query right?
 
Hey Karj or anyone else.

Here is a Screen shot on my form and the criteria that i put Querries.

On the Main report in last Name: "[Forms]![All Absent Data for Date Range]![Combo4]"

On the Subreports in Dateofabsence "(([Data Archive].[Date]) Between ([Forms]![All Absent Data for Date Range]![Start Date]) And ([Forms]![All Absent Data for Date Range]![End Date]))"

Now what am i doing wrong? My report keeps comming up blank (no Data)
 

Attachments

ok this is so beyond me

Thecherub said:
On the Subreports in Dateofabsence "Between ([Forms]![All Absent Data for Date Range]![Start Date archive]) And ([Forms]![All Absent Data for Date Range]![End Date Archive]))"

Ok i'm going batty here...the between now works. But not the way i want it to. as lon as i enter Dates in my form that are between the ranges it gives me all the data in the table. If i enter the dates from the first date to the last date i get nothing.

can somone please tell me what i'm doingwrong i'm out of my depth here.
 

Users who are viewing this thread

Back
Top Bottom