G
Guest
We are using a Microsoft Access 2003 project connected to a SQL Server 2000
back end. It is multi-user, about 5 users have their own copies of the .adp
and they all have rights to add and edit data. Al of the .adp projects are
connected to the same SQL Server back end.
I have a form frmClients and its record source property is saved as “Select
* From tblClients where 1 = 2†(this is so the form doesn’t come up with
data)
A combo box lists the clients, and when it is updated, the AfterUpdate event
of the combo box sets the form’s recordsource to whichever client was
selected. For example it might set the recordsource for frmClients to
“Select * From tblClients where ClientID = 37â€
Now let’s say another user is already editing Client 37. I am trying to get
it so that the 2nd user who is trying to get into edit Client 37 receives a
message telling him/her that “User ___ is already editing the client you have
chosen, so you are not allowed to edit this client at the same time.â€
So, the questions are:
1) How can I get the code to check to see if anyone else is currently
editing Client 37?
And
2) If someone is editing Client 37, how can I get the code to figure out who
is currently editing Client 37?
This seems possible, but I just don’t know how to do it! Thanks in advance
for any help you can give. Peace.
back end. It is multi-user, about 5 users have their own copies of the .adp
and they all have rights to add and edit data. Al of the .adp projects are
connected to the same SQL Server back end.
I have a form frmClients and its record source property is saved as “Select
* From tblClients where 1 = 2†(this is so the form doesn’t come up with
data)
A combo box lists the clients, and when it is updated, the AfterUpdate event
of the combo box sets the form’s recordsource to whichever client was
selected. For example it might set the recordsource for frmClients to
“Select * From tblClients where ClientID = 37â€
Now let’s say another user is already editing Client 37. I am trying to get
it so that the 2nd user who is trying to get into edit Client 37 receives a
message telling him/her that “User ___ is already editing the client you have
chosen, so you are not allowed to edit this client at the same time.â€
So, the questions are:
1) How can I get the code to check to see if anyone else is currently
editing Client 37?
And
2) If someone is editing Client 37, how can I get the code to figure out who
is currently editing Client 37?
This seems possible, but I just don’t know how to do it! Thanks in advance
for any help you can give. Peace.