Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

***LOCKING MDB FILE***

Status
Not open for further replies.

dsk525

Programmer
Mar 13, 2002
73
0
0
US
Hi All,

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.

Thanks
 
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.

You need help. They need help.

Jeremy

==
Jeremy Wallace
AlphaBet City Dataworks
Access Databases for Non-Profit Organizations

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
I was not "SHOUTING" by any means.

And thanks for YOUR LACK OF HELP!

I think you need to learn a few manners, my friend!
 
Hi

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 - UK
 
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.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top