Hello,
Before, I was able to create a continuous form and create a button that would open the specific record the user's cursor had clicked that opens another form that displayed that records information. IE: Select Project, click the open button, main form opens with only that project's record information.
Now, I am trying to do this for a Report - assuming it works the same way. I created a master "Project" report that shows the "rolled up" details of each project and the "totals". I also have another "sub report" that breaks each project down - that shows "products" for all projects.
I would like the user to be able to highlight/select a project from the "Main" report and have it filter that specific project Record while opening the sub report for products under that specific project (kind of how I did it for my form example above). When the user clicks on a project line in the report, the user can then click a "Button" (in the Report footer) to open the subreport with that specific record information about the particular project to show.
I tried using the following VBA code and doesnt work - I've also tried to build a Macro, but couldnt figure out how to have the subReport open with the filtered data about the specific project:
Private Sub cmdCommand58_Click()
DoCmd.OpenReport "FundingByProduct", acViewPreview, , "ProjectID = " & ProjectID
End Sub
What am I missing? I know this is probably extremely easy to do, but I cannot find out what I am doing wrong here. Thank you.
- Warren