Hide/Skip Records that have "Edited Records" Record Lock

K

Kane

This, I suppose, will be a two part question.

I have a database that I am working on that is being used to process Nixie
Invoices. Currently it works fine, however a change has been requested, that
I'm not entirely sure can be done, or how if it can.

The Nixie Invoices are processed through a form that displays customer
information, contact attempts, who made the attempts and what date they were
made on. I currently have the form setup so that the Record Lock Setting is
"Edited Records"

This will prevent two users from working the same record provided one of
them enters in their user id first. Which brings me up to the first
question. Is it possible to make it so that the record locks as soon as
someone opens up the form on the first record?

Then the second question is, is it possible to set it up so that once a
record is locked it doesn't display for another associate and it
automatically goes to the next record if there is one.

Thanks for the help guys.
 
D

Dale Fye

I've done this recently by adding a "LockedBy" text field to several of my
application tables.

Then, in the forms CurrentEvent, I check to see if LockedBy has data in it.
If so, I display a message to my user and lock the controls on the form so
they cannot be edited (see www.allenbrowne.com and search for lock controls).
If the field is empty, I immediately write the current users Windows userid
to that field and save the record. Then, before the user moves off that
record, I set that field to NULL.

The key to this, is that there is no event that you can count on firing when
you leave a record using the standard form navigation buttons. Since
BeforeUpdate doesn't necessarily take you off that record, and it only works
when the record is dirty, that will not work. The forms Close event will
work when closing the form, but I have created my own navigation buttons,
which allow me to set this value to Null before leaving the current record.

This is the only way I have found to accomplish this.
--
HTH
Dale

email address is invalid
Please reply to newsgroup only.
 
K

Kane

Unfortunately, I do not think doing it this way would work, as not all the
people that would be working on it have unique windows userids, most use a
generic userid that's setup for the department, as a vast majority of our
employees are seasonal, meaning only the supervisory staff and a few cores
have their own user.
 

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