Hi,
I cant seem to figure out how to pass a filter from a subform to a subform in my report so I can open the report in print preview to print.
I have a Main form (Summary) that includes a subform (SummaryQuerySubfrm) which are linked together by ID.
I have a combo box on the main form which filters the subform by using the code below in the after update event of the combo box.
Private Sub SummaryMonth_AfterUpdate()
SummaryQuerySubfrm.Form.Filter = "[SubformField]= '" & ComboBox & "'"
SummaryQuerySubfrm.Form.FilterOn = True
End Sub
I want to be able to print the current main form and the filtered subform the user has selected via a report (Print preview).
I am not sure how to pass the filter from my subform on my main form to the subform on my report.
At the moment when I select the print button on my main form, it brings up the print preview of the report however it does not filter the subform within the report.
I have been searching the forums but cant seem to find an answer. I have been stuck on this part of my database for ages, any help would be greatly appreciated.
Thanks
Ross
I cant seem to figure out how to pass a filter from a subform to a subform in my report so I can open the report in print preview to print.
I have a Main form (Summary) that includes a subform (SummaryQuerySubfrm) which are linked together by ID.
I have a combo box on the main form which filters the subform by using the code below in the after update event of the combo box.
Private Sub SummaryMonth_AfterUpdate()
SummaryQuerySubfrm.Form.Filter = "[SubformField]= '" & ComboBox & "'"
SummaryQuerySubfrm.Form.FilterOn = True
End Sub
I want to be able to print the current main form and the filtered subform the user has selected via a report (Print preview).
I am not sure how to pass the filter from my subform on my main form to the subform on my report.
At the moment when I select the print button on my main form, it brings up the print preview of the report however it does not filter the subform within the report.
I have been searching the forums but cant seem to find an answer. I have been stuck on this part of my database for ages, any help would be greatly appreciated.
Thanks
Ross