Question : error on executing an On Enter event

I wrote a short On Enter event that has an After_Update event on it also.

all the on enter event does is make sure that the fields that need to have values in them in order for the after update event to work, have values or else the on enter event sets the focus on the field that needs to be changed, and exits.

neato, it worked yesterday when I wrote it, but today I get this error message on entering the field:

"The Expression On Enter you entered as the event property setting produced the following error: Event Procedure Declaration does not match description of event having same name."

it had the name it had yesterday when it worked, why wouldnt it work today"

here is my code:

Private Sub est_plcmt_cnt_Enter()

If IsNull(Me.est_plcmt_date.Value) Then
MsgBox "Please make sure you enter an estimated placement date before entering the estimated placement amount", vbApplicationModal + vbOKOnly, "Date Entry Error"
Me.est_plcmt_date.SetFocus
Exit Sub
End If

End Sub

Answer : error on executing an On Enter event

Make sure you are adding events by clicking on the event you want, then clicking on the [...] to the right. Do not change the name of the procedures once access names them.

If that's doesn't take care of it, try compacting and repairing your DB (tools | database utilities).

If that doesn't work: can you use a events on a brand new form? If so,  recreate your form piece by piece by copying and pasting controls and code.  Sometimes Access objects get corrupted.

If you are still having a problem, try to use form events on a new DB. If that works try importing everything to a new DB.
Random Solutions  
 
programming4us programming4us