GoTo NextRecord

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.
 
B

Beetle

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
 
R

Richard

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top