The error looks like this:
"The Expression On Load you entered as the Event Property Setting produced the following error: The Procedure Declaration Does not Match Description of Event or Procedure having the same name."
The same errror comes up for all events called on that form, not just the OnLoad event. Nearly identical code on similar forms works fine.
The code for the OnLoad event is below. But it is never actually called. The error comes up before a breakpoint for the code.
Expand|Select|Wrap|Line Numbers
- Private Sub Form_Load()
- On Error Resume Next
- Combo178.Value = Coc_ID.Value
- CommandBars("Filter/Sort Only").Enabled = False
- End Sub
The initial code used the Sub declaration created by Access, when you go through the code builder for the event on the properties of the form.
In debugging, we tried various configurations that change whether or not the Sub parameters include "Cancel as Integer" we also tried removing the error handler, since the form that does work doesn't have the error handler.
We have also tried deleting the code for the event procedure and recreating the event procedure again from the form's propert box. and adding the code back in. Also, no luck.
Any other suggestions would be greatly appreciated.
Thank you.