Move to the next record

G

Guest

In my form -> Before update

I ask "Do you want to save changes"
if the reply is No, then I execute Me.Undo, after this
I would like the control to move either to the next
record or previous record or the form should be closed
depending on what users selected.

What should I put after Me.Undo? Or should I adopt another approach?

Thank you in advance,
-Me
 
M

Marshall Barton

Me said:
In my form -> Before update

I ask "Do you want to save changes"
if the reply is No, then I execute Me.Undo, after this
I would like the control to move either to the next
record or previous record or the form should be closed
depending on what users selected.

What should I put after Me.Undo? Or should I adopt another approach?


What does "depending on what users selected" mean???

THis might give you some food for thought, though.

Me.Undo
If Me.NewRecord Then
DoCmd.GoToRecord acForm, Me.Name, acPrevious
Else
DoCmd.GoToRecord acForm, Me.Name, acNext
End If
 
G

Guest

Thank you Marsh!
-Me


Marshall Barton said:
What does "depending on what users selected" mean???

THis might give you some food for thought, though.

Me.Undo
If Me.NewRecord Then
DoCmd.GoToRecord acForm, Me.Name, acPrevious
Else
DoCmd.GoToRecord acForm, Me.Name, acNext
End If
 

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