GoTo NextRecord

  • Thread starter Thread starter Richard
  • Start date Start date
R

Richard

I have a check box on my form, if the box is checked id like to go to the
next record. I tried this in the after update event.

Private Sub Called_AfterUpdate()
GoTo NextRecord
End Sub

I get a compile error label not defined. Any help would be great ty.
 
You want to go to the next record *only* when the box is checked
(not when it is unchecked)?

Private Sub Called_AfterUpdate ()

If Me.Called Then
If Me.Dirty Then Me.Dirty = False
DoCmd.GoToRecord , , acNext
End If

End Sub
 
Yes only when checked

Beetle said:
You want to go to the next record *only* when the box is checked
(not when it is unchecked)?

Private Sub Called_AfterUpdate ()

If Me.Called Then
If Me.Dirty Then Me.Dirty = False
DoCmd.GoToRecord , , acNext
End If

End Sub
 
Back
Top