It sort of depends on how many subreports you want to display at one time.
Let's say that you want to display just one of the subreports. First, on all
subreports set their visibility to No.
Now, create a small pop-up form with a drop-down list listing all the
subreports that are available. Name the field 'ReportsToView" or whatever you
want. Add a button labeled and named 'OK'. Then code the On-Click event to
read something like this:
If Me![ReportsToView] = "Subreport1" Then
Subreport1.visible = True
End If
DoCmd.CloseForm, "Pop-up Form",,,
If you're going display more than one, you would use an
'If...Then...Else' statement before the End If statement.
In the main report's properties, add either a macro or event code on the 'On
Open' event to open the pop-up form.
--
Rich
Ben said:
I have a main report and 10 subreports. Let's just say they are called
subreport1, subreport2...etc.
I want to have a box or something where I can select which subreports I want
for the main report. Is that possible? If so, how?
Thanks
Ben