form update event, but cannot proceed to next record

Lifeseeker

Registered User.
Local time
Today, 12:52
Joined
Mar 18, 2011
Messages
273
Hi,

I have this vba code written up in my main form, but when I click on go to next record button, the form won't respond.

In the after update event of the form, I have: (I have attached the database as well)

Private Sub Form_AfterUpdate()
If Me.a.Value = "yes" And Me.b.Value = "Yes" And Me.c.Value = "Yes" And Not IsNull(Me.d) Then
Me.ccm_patient.Value = "yes"

Else
Me.ccm_patient.Value = "No"
End If

End Sub

Any idea as to why the form is not allowing me to enter the next new record? I have checked the lock as well, but it's not locked.

Thank you very much
 

Attachments

When you modify a bound control in the AfterUpdate event of a form, you can easily create an endless loop. Have you single stepped the code to see what is happening?
 
When you modify a bound control in the AfterUpdate event of a form, you can easily create an endless loop. Have you single stepped the code to see what is happening?

I didn't get any syntax error from the code itself ,but the form just won't go to the next record.
 
A forever loop will not necessarily create a syntax error. Do you know how to get into debug and single step the code?
 

Users who are viewing this thread

Back
Top Bottom