Access 2002
Default File Format - Access 2000
I don't understand why this isn't working.
I have a continuous form with the following code:
My goal is to get back to the current record if they decide not to save their changes and have scrolled.
If I press the ESC key, it goes to the current record.
If I click my Undo button, it does not go to the current record.
Does anyone see what I'm missing?
Debbie
Default File Format - Access 2000
I don't understand why this isn't working.
I have a continuous form with the following code:
Code:
Private Sub cmdUndo_Click()
[green]'to go to the edited record[/green]
Dim recordnum As Long
recordnum = Me.CurrentRecord
DoCmd.GoToRecord , , acGoTo, recordnum
Me.Undo
Me.cmdClose.SetFocus
Me.cmdNext.Visible = True
Me.cmdPrevious.Visible = True
Me.cmdSave.Visible = False
Me.cmdUndo.Visible = False
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyEscape Then cmdUndo_Click
End Sub
My goal is to get back to the current record if they decide not to save their changes and have scrolled.
If I press the ESC key, it goes to the current record.
If I click my Undo button, it does not go to the current record.
Does anyone see what I'm missing?
Debbie