469,572 Members | 1,281 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,572 developers. It's quick & easy.

Display Message when Record locking set to Edited Record (Pessimistic)

Hi
To display a message when a user attempts to edit a record in a
multi-user environment where a forms Record Locking is set to Edited
Record and another user is editing a record, is difficult because
Access does not trigger an error, I have overcome this problem by
trapping the Delete and Backspace key in the KeyDown event of the form
and displaying a label on the form saying "If Record cannot be Edited
it may be that Another User is Editing the same Record, try again
later. Click here to close this message."

Select Case KeyCode
Case 8, 46
if Me.RecordLocks = 2 then Me!MyLabel.Visible = -1
End Select

On the MouseDown event of the label hide the label with

Me!MyLabel.Visible = 0

OK it isn't perfect but I think it is a useful solution unless some of
you know better.....................

Patrick
Nov 13 '05 #1
2 2266
On Fri, 15 Oct 2004 17:05:35 GMT, Patrick Fisher <in**@psoftuk.com>
wrote:

In Form_Current write:
MsgBox "Yo! Observe the potential STOP sign in the record selector,
and act accordingly!, vbCritical)

-Tom.

Hi
To display a message when a user attempts to edit a record in a
multi-user environment where a forms Record Locking is set to Edited
Record and another user is editing a record, is difficult because
Access does not trigger an error, I have overcome this problem by
trapping the Delete and Backspace key in the KeyDown event of the form
and displaying a label on the form saying "If Record cannot be Edited
it may be that Another User is Editing the same Record, try again
later. Click here to close this message."

Select Case KeyCode
Case 8, 46
if Me.RecordLocks = 2 then Me!MyLabel.Visible = -1
End Select

On the MouseDown event of the label hide the label with

Me!MyLabel.Visible = 0

OK it isn't perfect but I think it is a useful solution unless some of
you know better.....................

Patrick


Nov 13 '05 #2

Not a particularly useful method if you are not displaying record
selectors
Patrick
On Fri, 15 Oct 2004 22:33:10 -0700, Tom van Stiphout
<no*************@cox.net> wrote:
On Fri, 15 Oct 2004 17:05:35 GMT, Patrick Fisher <in**@psoftuk.com>
wrote:

In Form_Current write:
MsgBox "Yo! Observe the potential STOP sign in the record selector,
and act accordingly!, vbCritical)

-Tom.

Hi
To display a message when a user attempts to edit a record in a
multi-user environment where a forms Record Locking is set to Edited
Record and another user is editing a record, is difficult because
Access does not trigger an error, I have overcome this problem by
trapping the Delete and Backspace key in the KeyDown event of the form
and displaying a label on the form saying "If Record cannot be Edited
it may be that Another User is Editing the same Record, try again
later. Click here to close this message."

Select Case KeyCode
Case 8, 46
if Me.RecordLocks = 2 then Me!MyLabel.Visible = -1
End Select

On the MouseDown event of the label hide the label with

Me!MyLabel.Visible = 0

OK it isn't perfect but I think it is a useful solution unless some of
you know better.....................

Patrick


Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Andy Meyer | last post: by
6 posts views Thread by DebbieG | last post: by
3 posts views Thread by Jimbo | last post: by
1 post views Thread by jv | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.