Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filtered Subform not showing in report

Status
Not open for further replies.

freespiritcherishes

Technical User
Oct 17, 2003
42
GB
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

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top