V
Vsn
Hello all,
Who can give me the right method on the following:-
In my DB the user can choose to cancel the data change before the update the
done to the record.
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim stgMessage as string
stgMessage="Are you positive you like to update the record?"
If MsgBox(stgMessage, vbOKCancel + vbDefaultButton2, conTitle) = vbOK
Then
Else
DoCmd.CancelEvent
End If
End Sub
The change of record and thus above update check is triggered by a listbox,
which controls the record which is displayed. But if the record update is
canceled the requiry action of the list box generates error 2001 'You
canceled the privious operation'.
Private Sub lstPers_AfterUpdate()
Me.Requery
End Sub
How can I avoid this error, and still move to another entry in the listbox
and thus record.
Thx,
Ludovic
Who can give me the right method on the following:-
In my DB the user can choose to cancel the data change before the update the
done to the record.
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim stgMessage as string
stgMessage="Are you positive you like to update the record?"
If MsgBox(stgMessage, vbOKCancel + vbDefaultButton2, conTitle) = vbOK
Then
Else
DoCmd.CancelEvent
End If
End Sub
The change of record and thus above update check is triggered by a listbox,
which controls the record which is displayed. But if the record update is
canceled the requiry action of the list box generates error 2001 'You
canceled the privious operation'.
Private Sub lstPers_AfterUpdate()
Me.Requery
End Sub
How can I avoid this error, and still move to another entry in the listbox
and thus record.
Thx,
Ludovic