Hi–
Acc97/Win95
Has anyone seen this error before? It’s as if the controls on the form won’t recognize their own event procedures.
“The Expression After Update you entered as the event property setting produced the following error: Event procedure declaration does not match description of event having same name.”
Now, the code in the event procedure isn’t really much. I had a form built, and the code was quite happy. Then I tried to add one more control with similar code. The new control produced the above error. After checking it out, I thought maybe my database was corrupt. So I copied all of the objects into a new db. When I tried to open the form, none of the event procedures would work, including the OnLoad. I tried all variants of copying the form (aside from re-creating it from scratch), but it no longer works. A really old version of the form still works, though.
Here’s an example of the code:
In On Load, I have Me.lstState.Value = Me.lstState.ItemData(0) (which is supposed to select the first item in my listbox, but it never did work).
The code in the two combos is something like: Private Sub cboReport_AfterUpdate(Cancel As Integer)
Dim ctl As Control
‘If it’s a custom report, allow selections, but if it’s canned, disable selections
If cboReport = “Custom” Then
For Each ctl In Me.Controls
ctl.Enabled = True
Next
Else
For Each ctl In Me.Controls
If ctl.Name = “cboReport” Then
ctl.Enabled = True
Else
ctl.Enabled = False
End If
Next
End If
End Sub
Does anyone have any ideas?
Thanks!
Cecilia 🙂