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
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