Move to the next record

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
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
 
Back
Top