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!

Report filtered on a field in the sub-report

Status
Not open for further replies.

McLiguori

Technical User
Mar 27, 2003
90
IT
I have a report based on a members table. The report contains a sub report based on an 'activities' table listing the activity date and type of activity. The report gives member name and some member info, then a listing of the 'activities' relating to that member. All this works fine. The member info prints well, and the the sub report prints all the activities linked to that member. The report is activated by a button on my main input form which prints only the 'current' record.

I would like to be able to filter the report so that it will give me the member info and then allow me to select which activities print out (selected by a date or date range). I have tried to filter the activities on the input form. This does filter it, but when I print the record, the report does not 'pick up' the 'activities' sub-form filter. Is there a syntax I can use in my DoCmd.OpenReport, etc. line to have the report pick up the filter from the sub-form on my parent form?

Thank you for your help.

McLigs
 
How are you doing this: "'activities' sub-form filter"? Is this only from controls on the main form or are you using some other method to filter the subform?

You won't be able to add anything to the WHERE CONDITION of the DoCmd.OpenReport that references fields only available in the subreport. You might be able to change the SQL of a saved query. Also, is it possible to do this without using a subreport?

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top