G
Guest
Hi,
I have a form that has option buttons on it. I have code on the form that
determines whether a option button has been pressed and if it has I want to
requery the form.
Here is the code I have so far.
Private Sub Frame8_AfterUpdate()
If Me!Frame8.Value = 1 Then
The_Year = 2005
Else
The_Year = 2006
End If
Me.RecordSource = "SELECT Tbl_Table.Animal, Tbl_Table.Year,
Tbl_Table.Units, Tbl_Table.Retail FROM Tbl_Table WHERE (((Tbl_Table.Year)=" &
The_Year & "));"
Requery
End Sub
When I select a new option I get the error
Run-time error '200'
You canceled the previous operation.
I have a form that has option buttons on it. I have code on the form that
determines whether a option button has been pressed and if it has I want to
requery the form.
Here is the code I have so far.
Private Sub Frame8_AfterUpdate()
If Me!Frame8.Value = 1 Then
The_Year = 2005
Else
The_Year = 2006
End If
Me.RecordSource = "SELECT Tbl_Table.Animal, Tbl_Table.Year,
Tbl_Table.Units, Tbl_Table.Retail FROM Tbl_Table WHERE (((Tbl_Table.Year)=" &
The_Year & "));"
Requery
End Sub
When I select a new option I get the error
Run-time error '200'
You canceled the previous operation.