Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date range on subform

Status
Not open for further replies.

allong

Technical User
May 2, 2003
40
US
I have a report that have a subreport. I am using a date range form to pull up the dates in the main report. I want to pull up different dates in my subreport. I know this can be done but I am not sure how. Please help.
 
You would need to place dates on a form that can be used in the criteria of the record source of your subreport.

Duane
MS Access MVP
 
Duane there are dates on a form. In my query for the main Report I have >=[Forms]![Report Date Range]![Beginning Date] And <=[Forms]![Report Date Range]![Ending Date]. In subreport query I have between [Beginning Date] and [Ending Date]. I want to put in dates for both reports. But the subreport keep asking for a date. Do not know what I'm doing wrong.
 
The query your subreport is based on should have a criteria of
>=[Forms]![Report Date Range]![Beginning Date] And <=[Forms]![Report Date Range]![Ending Date]

If it is asking for some other value than you have an issue with a query parameter or expression in sorting and grouping or a control source.

Duane
MS Access MVP
 
Duane, I put the code into my subreport. It does not if me the option to put the dates I want to have on the subreport. The main report and the subreports has different dates. Do I need to put something in the on open of the subreport?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top