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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MuliUser Newbie (Previously Forgot to Include Subject ) 2

Status
Not open for further replies.

dnayana

Programmer
Nov 14, 2002
53
US
Thanks in advance to anyone who can provide me some assistance/guidance.

I have a database that has to be set up for multiuser access. This is the first for me, so I'm not sure how to go about doing it.

I've already split up the db. The tbls are on the network server and I plan on making a copy of the objects onto each user's machine (3 total). I've set the Default open mode to shared and the Default record locking to edited record.

What I am unsure about is if I have to set the Record Locks property for each form to edited record also (since when I originally created the forms, it was set to No Locks). Since I set it on the database as a whole (i.e., default open mode) will it transfer to all the objects if it is in its own db.

Like I mentioned before, this is my first multi-user application that I have developed and I have no idea on the proper way of doing this.

After sending the first post, I did further research and know that I need the SR-1/SR-1a update. After I have the network person obtain that patch, I'm still lost as to what to do.

Any help/guidance is greatly appreciated.

Again, thanks in advance!
 
The Options dialog setting for the "database as a whole" applies to tables and queries. It is also the default for new forms. That is, when you create a form, its Record Locks property is set to the Options dialog setting. Once the form has been created, however, changing the Options dialog has no effect. So you need to change the property of your forms in order to get the new setting.

However, are you aware that "No Locks" doesn't really mean no locks? This setting actually means that Access locks the record just before updating it, and unlocks it immediately afterward. This is also referred to as "optimistic locking", because it optimistically assumes that no other user has updated the record since it was first read. Even so, when No Locks is in effect, Access actually compares the record to a saved copy before updating it to verify that no other user has updated it. If the record compares equal, it is updated as usual; if another user has changed it, the user is presented with the options of (1) cancelling the update, (2) saving his changes and overwriting the other user's, and (3) copying this user's version of the record to the Windows clipboard and then displaying the other user's version of the record (after which this user can decide whether to paste his own version of the record back in and update it anyway).

In other words, if you leave the forms with No Locks, you're still protected from updates being lost without warning. The advantage is that the record remains unlocked while the user is editing it--which is important because unless you're using record-level locking (available in Access 2000 and later), locking one record actually locks a whole 4096-byte page of records, so a number of records will be unavailable to other users for editing.

In your case you have only 3 users, so chances of a collision trying to update the same record are probably slim, while chances of a page collision are probably much higher. As long as you can trust your users to treat the warning dialog seriously, should it occur, using the No Locks setting will give you better concurrency of record updating.

Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
dnayana

The record lock property is a property of the form. Consequently, if you have split the data and forms + reports correctly, this property will be perserved when you populate the front end to the desktop.

Record locking can be a pain. It will stop complete access for others. So if one user has a form open, and locked the record, and has left for lunch, and some one runs a report or query that includes the record -- kabamm!

If not done already, open the form in read only format, and have special logic to edit / add a record. A tad more when editing but actually much safer. (The default for Access forms is to allow the user to enter / edit data -- this becomes problematic when inexperienced users end up editing old records instead of adding new records, etc.)

For this issue, I will often include a toggle button on the form to switch from read mode to edit mode and back to read mode. JeremyNYC also had a real cool idea of using the timer event. This way, if some one does leave for lunch, the record could be toggled back to the read view.

Richard
p.s. I had trouble posting the first time -- a whoops error what ever that is. So if the post appears twice, sorry...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top