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

Locking a form

P: 6
I have a database that was created so that 4 separate shops could go
in and enter pertinent information about how their shops ran
throughout the day so that my boss (and theirs) could report out to
his boss at the end of the day about how things went. Each shop has
its own form to enter their information. I gave them separate forms
bound to 4 separate tables because the information gathered from each
shop is unique. Each form opens with the following code:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Open(Cancel As Integer) 
  2.     DoCmd.Maximize 
  3.     DoCmd.OpenForm "ShopDailyfrm", , , "txtDate = Date()" 
  4. End Sub
So that they always see each day's information and can go in multiple
times throughout the day to add and update data / comments. The
database then creates one report containing the information
for all 4 shops that my boss uses to report out to his boss.

Problem is that there are multiple users adding information to the
tables. I have told the users within each shop that there should
only be one person in the shop specific form at a time. I have one
shop that does not always adhere to this and some days I end up
with multiple records. My hope is to prevent this by "locking-out"
the form to one user at a time. I thought by checking the "Edited
Record" radial on the advanced Options tab would elminate multiple
records, but it hasn't.

Can anyone assist me in locking the form to one user at a time?

I am running Access 2003 on Windows XP.
Oct 14 '07 #1
Share this Question
Share on Google+
6 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
In Advanced Options, change the Default Open mode from Shared to Exclusive. This will only allow one user to open the database to enter or edit records at a time. All other users will only be able to open it as Read Only.

Locking to Edited record only locks the record currently being edited.
Oct 14 '07 #2

NeoPa
Expert Mod 15k+
P: 31,186
I suspect that locking the entire database (open exclusive) would also stop the other shops from doing their work. As they all use different tables try setting the locking mode to "All records". This should simply lock the table for the shop.
Oct 14 '07 #3

MMcCarthy
Expert Mod 10K+
P: 14,534
I suspect that locking the entire database (open exclusive) would also stop the other shops from doing their work. As they all use different tables try setting the locking mode to "All records". This should simply lock the table for the shop.
Reading between the lines I don't think they are all on the same database, just copies. I could be wrong though.
Oct 14 '07 #4

P: 6
Reading between the lines I don't think they are all on the same database, just copies. I could be wrong though.
They are all in the same database, so making the database open exclusive will not suit my needs.
Oct 14 '07 #5

P: 6
I suspect that locking the entire database (open exclusive) would also stop the other shops from doing their work. As they all use different tables try setting the locking mode to "All records". This should simply lock the table for the shop.
I will try this, thank you for the advice.
Oct 14 '07 #6

NeoPa
Expert Mod 15k+
P: 31,186
I will try this, thank you for the advice.
No problems. I hope it works for you.
Oct 14 '07 #7

Post your reply

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