By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,191 Members | 1,256 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,191 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a

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.