G
Guest
I am trying to filter a subform by clicking a buton in the main form. Here
are the form and filed names:
Key:
Main form = frmMain
Field in Main Form = POLookup (this is a text string and is the filter
criteria)
Subform = frmSub
Field in Subform = PONo (this is a text string and should be filtered
according the value in POLookup on the main form)
Here is the code for the button called POFilter:
Private Sub POFilter_Click()
Me.frmSub.Form.Filter = "me. frmSub.Form.PONo'" & Me.POLookup & "'"
Me. frmSub.Form.FilterOn = True
Me. frmSub.Form.Refresh
End Sub
Please help me correct my errors. Thank you for your help
are the form and filed names:
Key:
Main form = frmMain
Field in Main Form = POLookup (this is a text string and is the filter
criteria)
Subform = frmSub
Field in Subform = PONo (this is a text string and should be filtered
according the value in POLookup on the main form)
Here is the code for the button called POFilter:
Private Sub POFilter_Click()
Me.frmSub.Form.Filter = "me. frmSub.Form.PONo'" & Me.POLookup & "'"
Me. frmSub.Form.FilterOn = True
Me. frmSub.Form.Refresh
End Sub
Please help me correct my errors. Thank you for your help