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

Warn user2 if user1 on requested record

P: 13
Using Access 2003, linked tables to SQL Server, and using a form that's mostly bound. I need a way to tell if user1 is on the record when user2 tries to open the same record, w/o waiting for the user1 to save the record first. I don't want to wait until the write-conflict error occurs. I want to pre-warn user2 that user1 is on the record. The only way I can think of is by adding a flag to the record and setting it to true when user1 opens the record. If user2 tries to open it, the flag is checked for true, then a message would be displayed to them
that user1 is on the record. When user1 saves the record, then the
flag is set to false.

Is this a good way to do this? Thanks for any help or advice.
Sep 26 '08 #1
Share this Question
Share on Google+
5 Replies


DonRayner
Expert 100+
P: 489
Not sure if this works on SQL DB or not but try Tools-Options-Advanced

Under "Default Record Locking" set for Edited Records and also make sure that the "Open Databases using record level locking" checkbox is checked.
Sep 26 '08 #2

NeoPa
Expert Mod 15k+
P: 31,660
That's the only way i can think where you can know WHICH other user has the record locked.

Otherwise, any time you go to a record, if you attempt to .Edit it with On Error Resume Next set, you can check Err to see if it failed and how.

If it didn't then immediately .Cancel the update.
Sep 26 '08 #3

P: 13
Thanks for your reply. Those settings won't work in a SQL environment. This is weird. I'm not finding anything in newsgroups or other sites where people have had this issue. I can't believe I'm the only one with this problem!
Sep 26 '08 #4

NeoPa
Expert Mod 15k+
P: 31,660
I'm sorry I can't be more help. I'm afraid I just don't play much in that area :(
Sep 26 '08 #5

P: 13
Thanks for your reply, NeoPa.
Sep 26 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.