Sharon Hague
Registered User.
- Local time
- Today, 16:08
- Joined
- Jul 10, 2003
- Messages
- 138
Hi All
Can anybody help with the following: -
I have created a subform from a query. In the subform design view I have created an option group for me to select an option for the form to filter. In my option group properties I have entered the following code in the afterupdate option: -
Private Sub FilterOptions_AfterUpdate()
If FilterOptions = 2 Then
Me.Filter = "SalaryMth='1'"
Me.FilterOn = True
Else
Me.FilterOn = False
End If
End Sub
However when I run this and click on the option an error appears as "Run-tim error 2001" You cancelled the previous operation, resulting in the form not filtering the records.
When I press debug it takes me to the code and the Me.filteron=True is highlighted.
I can't uderstand what could be wrong as I have used a similar option group in other subforms where it works.
Can anybody help?
Can anybody help with the following: -
I have created a subform from a query. In the subform design view I have created an option group for me to select an option for the form to filter. In my option group properties I have entered the following code in the afterupdate option: -
Private Sub FilterOptions_AfterUpdate()
If FilterOptions = 2 Then
Me.Filter = "SalaryMth='1'"
Me.FilterOn = True
Else
Me.FilterOn = False
End If
End Sub
However when I run this and click on the option an error appears as "Run-tim error 2001" You cancelled the previous operation, resulting in the form not filtering the records.
When I press debug it takes me to the code and the Me.filteron=True is highlighted.
I can't uderstand what could be wrong as I have used a similar option group in other subforms where it works.
Can anybody help?