Record lock fix?

J

JHumbert

I have a database that I'm using record lock on so that 2
users can't modify a record at the same time. It works,
however what I need is to write a function that
bypasses/hides records that another person is on rather
than just notifying them when they try to make a change to
it. I don't want them to be able to view it at all. Is
that possible? If so, I'd greatly appreciate a script to
perform that function.
 
K

Kevin

When I need to do something like this, I copy the record
(s) into a temporary table and delete them from the main
production table. Put the temp table in the front end
application, not the backend database. Edit the record (or
whatever your doing), then copy the record back to the
database. If the records are not there, they can't access
them.

The other thing you could do is have a "Locked" flag in
the table. Set that flag when a user is accessing the
record, then base the record source on the form on a query
which would not select a record with the flag set. Make
sure you reset the flag when the record is not being
accessed. A simple way to accomplich this would be with an
Edit button on your form. As long as the flag is not set,
any user can access it. select the record, then press the
edit key, edit the record, then press the save key which
would reset the flag.

Kevin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top