I have an MDB on the network drive. If I am using it, I would like to lock it so that other users on the network cannot use the same file or otherwise can only go into the file in read mode.
Read about user-level security and database passwords.
Then read about being polite, and not SHOUTING your subject to the world. Every one of the posts here is from someone looking for help. It's pretty rude of you to SHOUT and it's pretty rude of you to try to make your post more prominent than others' posts.
Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
As Jeremy suggests reading up on security may help.
Alos you might like to look at the possible locking settings for recordsets, I copied this from help, it sounds like what you are trying to do:
All Records 1 All records in the underlying table or query are locked while the form is open in Form view or Datasheet view, while the report is previewed or printed, or while the query is run. Although users can read the records, no one can edit, add, or delete any records until the form is closed, the report has finished printing, or the query has finished running.
Regards
Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now -
Netiquitte says that captializing everything is shouting...
To answer your question, user level security as JeremyNYC suggests is your best bet. He recommended reading up on it because it is an involved topic... A lot to know not too terribly complex. However, user level security will control who can do what in a database and not address the simultaneous problem. If you genuinely want to prevent others from changing data while you are in the file, you will need to open all the tables with locks... Although this is cumbersome programmatically it would work. I don't know the code for locking by heart, so check out help. The real trick will be unlocking the data for you to make a change. I recommend user level security.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.