freespiritcherishes
Technical User
I have a Tab Form called Diary with a Subform called Mini List. On the main form, I have a button that applies a parameter query filter to the subform. When clicked it prompts me for a string which I enter data and the subform displays the records. Great! But...
How do I attach a button on the main form that will preview a report ("DiaryList") with the subforms filtered records?
The closest I have got is:
on the onclick event of the openreport button
If Len(Me.MiniList.Form.Filter & "") > 0 Then
DoCmd.OpenReport "DiaryList", acViewPreview, , Me.MiniList.Form.Filter
Else
DoCmd.OpenReport "DiaryList", acViewPreview
End If
and the onOpen event of the Report is:
Me.Filter = Forms("Diary").Controls("MiniList").Form.Properties("Filter")
Me.FilterOn = True
and its still returning all records. Can anyone tell me what Im doing wrong?
Ive tried other web forums and they have not been able to help.
freespirit
How do I attach a button on the main form that will preview a report ("DiaryList") with the subforms filtered records?
The closest I have got is:
on the onclick event of the openreport button
If Len(Me.MiniList.Form.Filter & "") > 0 Then
DoCmd.OpenReport "DiaryList", acViewPreview, , Me.MiniList.Form.Filter
Else
DoCmd.OpenReport "DiaryList", acViewPreview
End If
and the onOpen event of the Report is:
Me.Filter = Forms("Diary").Controls("MiniList").Form.Properties("Filter")
Me.FilterOn = True
and its still returning all records. Can anyone tell me what Im doing wrong?
Ive tried other web forums and they have not been able to help.
freespirit