G
Guest
I have a form which users can use to open a report. They can select program
values from the [programvalue] field, then click the "view" button, which has
the following OnClick:
For Each varselected In Me.programvalue.ItemsSelected
strSQL = strSQL & "'" & Me.programvalue.ItemData(varselected) & "',"
strSQL2 = strSQL2 & "'" & Me.programvalue.ItemData(varselected) & "',"
Next varselected
strSQL = "[program] IN (" & Left(strSQL, Len(strSQL) - 0) & ")"
strSQL2 = "[program] IN (" & Left(strSQL2, Len(strSQL2) - 0) & ")"
DoCmd.OpenReport "Obligations/Expenditures By Month", acPreview, , strSQL
The report has been opening fine showing information for program values
selected. However, I ave recently added a subreport. I want to make sure
that the subreport shows ONLY information for the programs selected also.
Currently, it is only showing information for the first program selected.
How can I get the subreport to show ALL and ONLY the values selected in the
report criteria form?
Thanks in advance,
geebee
values from the [programvalue] field, then click the "view" button, which has
the following OnClick:
For Each varselected In Me.programvalue.ItemsSelected
strSQL = strSQL & "'" & Me.programvalue.ItemData(varselected) & "',"
strSQL2 = strSQL2 & "'" & Me.programvalue.ItemData(varselected) & "',"
Next varselected
strSQL = "[program] IN (" & Left(strSQL, Len(strSQL) - 0) & ")"
strSQL2 = "[program] IN (" & Left(strSQL2, Len(strSQL2) - 0) & ")"
DoCmd.OpenReport "Obligations/Expenditures By Month", acPreview, , strSQL
The report has been opening fine showing information for program values
selected. However, I ave recently added a subreport. I want to make sure
that the subreport shows ONLY information for the programs selected also.
Currently, it is only showing information for the first program selected.
How can I get the subreport to show ALL and ONLY the values selected in the
report criteria form?
Thanks in advance,
geebee