Master report to show only current record

andrewhoddie

Board Regular
Joined
Dec 21, 2008
Messages
114
Hi all

I have created a master report called Details which has Report1 Report2 Report3 upto Report8 on it. However I am unable to get the master report to only show the current record from the form via a command button. Each of sub reports is set to show current record as is the master but this isn't working.

What I need to be able to do is print/view the master report for the current record only.

please can someone advise how to resolve this

many thanks
Andrew
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
When you open the report with the form command button, your code should apply a filter to the report. The value can come from a form control or field, but the main report recordsource has to have this field in common with whatever the form is based on (table or query field). Pretty sure that the field value for the currently selected record is passed to the form automatically and you can get it by using Me.NameofYourControl. Use the WhereCondition parameter of the DoCmd object for opening a report:
OpenReport(ReportName, View, FilterName, WhereCondition, WindowMode, OpenArgs)
You might want to code for the possibility that a user clicks the button when no record is selected.
BTW - 8 subreports on a main report seems too extreme. I thought the max permissible was 7 too.
 
Upvote 0

Forum statistics

Threads
1,221,825
Messages
6,162,165
Members
451,750
Latest member
dofrancis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top