PDA

View Full Version : record lockind



pramoc
06-30-2007, 10:18 PM
HUY,HELLO,GOODMORNING

i have table "ect"
it has folloing fields.
A A C D status acoments bcomment


1 2 2 3 null
1 2 3 3 null
1 2 3 3 null
1 1 1 1 null
1 1 1 1 revew tl
1 1 1 1 review sme


there are 4 users for this ACCESS application.
user clicks pick pool button control goes to table ,only those records are assigned to user interface which has null in status field.


1st user logs in 1st record with null value is assigned to user while the 1st user is editing the record 2 nd user logs in so he should be assigned diffrent record which has null in status field NOT 1ST RECORD and WHILE 2 USER IS EDITING SO THIRD USER SHOULD BE ASSIGNED 3 RD RECORD AND so on.

OBP
07-01-2007, 07:02 AM
pramoc, you should be able to this as follows.
Assuming that you are using a form for your data entry you can achieve this by using a Query for the Form's data source. Set the Query Property to View Totals and set the Status Field Column's Group by setting to "First" and it's Column Criteria to Null. In the Form's "On Current" event you will need some VBA that uses a RecordSet Clone which sets the Tables Record Status to something other than Null.
In this way when the next user opens the form the already opened record will no longer be available to the Query.