ACC2: OnError Property Does Not Trap Locking Error in FormID: Q116065
|
Moderate: Requires basic macro, coding, and interoperability skills.
If you have a form's RecordLocks property set to No Locks and a multiuser
record locking error occurs, the form's Error event is not triggered, and
the normal "This record has been changed by another user since you started
editing it..." dialog box appears.
The Error event is triggered when a run-time error is produced in Microsoft Access. The multiuser record locking error mentioned above is not a trappable run-time error.
Microsoft has confirmed this to be a problem in Microsoft Access version 2.0. This problem no longer occurs in Microsoft Access version 7.0.
The Error event is triggered when a run-time error is produced in Microsoft
Access. If you set the form's OnError property to a macro or event
procedure, Microsoft Access will run the macro or event procedure when a
run-time error occurs.
If you set a form's RecordLocks property to No Locks, no error will be
trapped when two users modify the same record at the same time. Instead,
Microsoft Access will display a dialog box to the user who attempted to
save the record last, prompting the user to save the changes, discard the
changes, or copy the changes to the Clipboard.
=MsgBox("An error has occurred.")
For more information about Error events, search for "error events," and
then "Error and Timing Events" using the Microsoft Access Help menu.
Microsoft Access "User's Guide," version 2.0, pages 107 and 224
Additional query words: optimistic
Keywords : kbusage FmsProp
Version : 2.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: April 3, 1999