repost - two front-end users were able to update same record

F

Freeda

I have this code on my form since my Lender ID is not autonumber, I had
problems (before) updating my records..

Private Sub Form_Current()

If Me.NewRecord Then
Me.txtLenderID.Enabled = True
Else
Me.txtLenderID.Enabled = False
End If

Exit Sub

End Sub

Is there any way to make a unique id so the front-ends cannot update the
same record at the same time? Thanks again.
 
R

Ron2006

Is the update process that is causing the problem via a macro/query,
or are you having problems with two people sitting on the record at the
same time in a form.??


=========


Add an autonumber to the records but never show it to the user, and
have your forms etc use this autonumber.

Ron
 
F

Freeda

Both users can update the same Lender ID with different information (since I
did not set it as an auto-number/unique ID when I created my table).
 
R

Ron2006

We repeat:

Is the update process that is causing the problem via a macro/query,
or are you having problems with two people sitting on the record at the

same time in a form.??
 
R

Ron2006

Now I am really confused. The subject says :
two front-end users were able to update same record

But the hidden text on the first message seems to be talking about
creating duplicate records. Those to two entirely different things and
I don't know which it is.
 
F

Freeda

I already split my database. There are currently just 2 users. We tried to
update the same record number and ended up doing so with different data.
When I was the only one using the database, I would manually input the Lender
ID number on the form then the Lender ID text box will be enabled after I
input the next record number. I hope that made sense.
 
F

Freeda

Hi Ron and Rick

Thanks so much for your help. I'm sorry if I'm not very clear with my
explanations. I guess the root of my problem is my Lender ID in not an
auto-number thus, I don't have a unique ID to enable the first user to lock
the record (for new records; and this allows the other user to populate the
same record ID with different data).
 
R

Rick Brandt

Freeda said:
Hi Ron and Rick

Thanks so much for your help. I'm sorry if I'm not very clear with my
explanations. I guess the root of my problem is my Lender ID in not
an auto-number thus, I don't have a unique ID to enable the first
user to lock the record (for new records; and this allows the other
user to populate the same record ID with different data).

"Rick Brandt" wrote:

Sorry but this is still mish-mash.

You DO need a unique ID number for every record inserted.

You DO need to lock edited records so that only one user at a time can edit
a particular record.

BUT...the two statements above have nothing to do with each other. They
are completely separate concepts.

I still can't tell if you are trying to avoid two users creating separate
records with the same ID value or if you are trying to prevent two users
from editing the same record at the same time.
 
F

Freeda

Yes, I want to prevent two users from creating separate records with the same
ID number. So, can my question now be, how do I create a unique ID when I
already have almost 400 records on my database.
 
R

Rick Brandt

Freeda said:
Yes, I want to prevent two users from creating separate records with
the same ID number. So, can my question now be, how do I create a
unique ID when I already have almost 400 records on my database.

Fix any existing duplicates manually, then open the table in design view and
either make that field the Primary Key for the table or (if there is already a
PK) set it to "Indexed - No Duplicates"
 
Top