Hello,
I'm trying to pass values from a Multiselect list box to sub reports. I have a report with three sub reports. The first sub report is named "Graph1", second "Report1" and third "Report2."
How would I pass one multiselect list box to all three of these sub reports.
This is the code to pass a value directly to one report:
Private Sub Command6_Click()
For Each varItem In Me![lstOutput].ItemsSelected
StrWhere = StrWhere & "Output_CD=" _
& Chr(39) & Me![lstOutput].Column(0, varItem) & Chr(39) & " Or "
Next varItem
StrWhere = Left(StrWhere, Len(StrWhere) - 4)
DoCmd.OpenReport "qryProj/Output_CM_Chart", acViewPreview, , StrWhere
End Sub
You can either modify my existing code or provide edited changes to it.
Thanks in Advance!!!
I'm trying to pass values from a Multiselect list box to sub reports. I have a report with three sub reports. The first sub report is named "Graph1", second "Report1" and third "Report2."
How would I pass one multiselect list box to all three of these sub reports.
This is the code to pass a value directly to one report:
Private Sub Command6_Click()
For Each varItem In Me![lstOutput].ItemsSelected
StrWhere = StrWhere & "Output_CD=" _
& Chr(39) & Me![lstOutput].Column(0, varItem) & Chr(39) & " Or "
Next varItem
StrWhere = Left(StrWhere, Len(StrWhere) - 4)
DoCmd.OpenReport "qryProj/Output_CM_Chart", acViewPreview, , StrWhere
End Sub
You can either modify my existing code or provide edited changes to it.
Thanks in Advance!!!