If your code performs an OpenRecordset, you should be able to use the
dbDenyWrite option. That should allow everyone to keep reading the table,
but no-one to change it.
The alternative is to open a transaction, and then Execute your action
queries with dbFailOnError. If anything goes wrong, RollBack. For details of
the kinds of traps to avoid when using transactions, see the example in this
article:
http://www.allenbrowne.com/ser-37.html
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Alvin T" <cd***@pipeline.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
I've got an app with a .mdb front end and back end. I need to execute
an end of month routine and need exclusive use of several tables during
this routine. I want to test whether the op can get exclusive use of
the tables and inform them if they can't. And also test whether the
table is locked and inform other users to come back later. All I can
find are references to optim and pessim record locking and nothing on
locking an entire table. I don't want to open the entire .mdb
exclusively since this prevents users from accessing tables not
associated with the EOM. Any ideas?