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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

option group filter in subform

Status
Not open for further replies.

EndoDoc

Technical User
Apr 28, 2002
12
US
I've set up a filter in a form (subform actually) based on an option group. It is set up as such:

Private Sub OptionGrpMedFilter_AfterUpdate()
If OptionGrpMedFilter = 2 Then
DoCmd.ApplyFilter , "DC = 0"
Else: DoCmd.ShowAllRecords
End If
End Sub

This works fine when I open this form directly. However, when I open my parent form, and try the filter (now located in a subform [one-to-many relationship]), I get an "Enter Parameter Value for 'DC'" message box. Why is this? It seems as if Access is trying to apply the filter to the parent form, not the child form.
Any ideas? Thanks. BTW, using Access97
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top