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

Access2000 Limiting Users in a Form

Status
Not open for further replies.

KenReay

Programmer
Aug 15, 2002
5,424
GB
Hi

I have request from a user, which I am unsure how to service

I have a form which allows users to create/amend/deleet rows in a table.

Client want this to be restricted so that only one user may update at any given time, any further users get readonly access to the form

Anyone any bright idea on how this could be accomplished without the obvious expedient of have a table to tell you who is in the form (I can do that if it is the only way, but do not like the idea since it requires human intervention in the event of a sustem crash

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Can't you just set locking to all records? Then whenever anyone fires up the form, everybody is locked out until they leave. The other users can still see the data.

 
Hi again

Having read the help file, I would agree this should do what I want, but when I try it I get error 3211 "cannot lock table ..tablename.. " when the second user attempts to open the form, so it appears that this option gives effectively exclusive use of the table to the first user in. I will keep on experimenting for a bit longer

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Not as easy as I thought.

The book says to avoid this you first try a recordset.edit. Follow this with .MoveNext then .MovePrevious. This does nothing but if the recordset is locked you can trigger an error, pick up the locking user name from the error message and then decide on an alternate course of action.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top