473,398 Members | 2,389 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Identify a Locked Record?

23
I have set the Record Locked property to Edited Record so only one user can make changes at a time (using Access 2003). The circle with the line through it appears but everyone is freaking out that they can't make changes. The MS message doesn't appear that lists three choices which is fine because I don't want to allow them to do anything but move on to a different record until the person with the record open is done.

So, what I need to do is send a message box explaining that the record is locked and you have to wait. I would like to put this on the OnCurrent, or other event, but do not know how to write this IF statement, I'm not a programmer. How do you identify a locked record? (If ??what?? is locked then msgbox, etc.)Thanks for the help.
Feb 17 '11 #1
8 5050
NeoPa
32,556 Expert Mod 16PB
A tricky one this.

I found Me.Recordset.EditMode, but it only seems to recognise the status as set by the current process. IE. It doesn't get updated to show when another process is updating the record, as I think you require.

Sorry I couldn't be more help, but I'll keep an eye on this thread in the hope that someone manages to find an answer. Interesting.
Feb 17 '11 #2
AnnMV8
23
Thank you. I appreciate all the help I can get and will look at Me.Recordset.EditMode to understand what it is and does.
Feb 17 '11 #3
NeoPa
32,556 Expert Mod 16PB
No worries Ann. I've sent out a call for assistance on this one, so I hope we can get a more useful answer for you.
Feb 17 '11 #4
AnnMV8
23
I looked at the Me.Recordset.EditMode which referenced the EditModeEnum and it's values. Is it possible to program an IF statement that says if it's any of the Constants with their corresponding Value don't do anything, otherwise, send the message? I'm just guessing here since I'm not a programmer.
Feb 17 '11 #5
NeoPa
32,556 Expert Mod 16PB
When I found it, I tested it with records that were locked as well as unlocked (not both at the same time of course), and the state returned was zero (0) in both cases. From this I would say that is not a viable working hypothesis. Sorry.
Feb 18 '11 #6
mshmyob
904 Expert 512MB
Would having a user try editing the record and if it is locked then trap the error and display a message indicating the record is locked.

cheers,
Feb 18 '11 #7
AnnMV8
23
Unfortunately, I don't know. I'm not a programmer so that is why I was hoping to get it done with an IF statement and a message box, I can write some of those.
Feb 18 '11 #8
NeoPa
32,556 Expert Mod 16PB
Trapping the error is always a possibility (look up On Error in Help), but I always feel it's preferable, where possible of course, to get the information without having to crash through an error. That can work of course, and failing a more direct solution, would be one I'd use, but error handling can get messy in some circumstances. It's the best solution so far still, of course ;-)
Feb 19 '11 #9

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

Similar topics

1
by: Dudley Joseph | last post by:
Hi Ive got an Access97 db with a record in one of the tables that appears to be locked by another user even though no one is using it and the ..ldb confirms this. I need to delete this record...
6
by: DebbieG | last post by:
I have created a database for a client and was told that it was to be a one-user database. Well, you know the next statement ... now they want 3 people to be able to use the database. (FYI, I...
4
by: William Bradley | last post by:
What I need to have happen is, that when the form is filled out by the user, the user can produce a report of that record only. Any help would be appreciated. Thank you. William Bradley...
3
by: John Baker | last post by:
Hi: I need to determine if removing a record from a table would leave the table empty, in which case I do not want to permit it. Can someone tell me how I determine the number of records in a...
1
by: Rolan | last post by:
Having tried various permutations of Before Update and well for that matter, After Update, OnExit, OnEnter, etc. and also Locked controls, I'm still unable to obtain the intended results. There are...
1
by: andrew.newell | last post by:
Hi, I use MS Access to connect to and SQL Database this has been working fine until recently. Whenever I add a new record (post record 723) it does not allow me to change it. My DBA has...
1
by: pj | last post by:
Testing a database on a standalone machine gives the message 'Record currently locked by another user'. The record then presents '#Error' in each of the fields. The message repeats itself on screen...
5
by: John | last post by:
Hi If I have a form open, what is the code that is equivalent to using the File->Print menu with select record(s) option to print the form with the currently displayed record values? Thanks ...
1
by: robert.waters | last post by:
Is there any way to identify a record based on where the user's cursor is located, if the cursor is located somewhere in a query or table window? I would like to have a commandbar button call a...
5
by: Kaloyan Krumov | last post by:
I have the following setup: Table containing record for transactions with products – in and out of a warehouse. Continuous form for entering transaction information. I have filtered the form to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.