B
Brotha Lee
Hi all,
I have the following question. In a database I have a form, with a subform.
The main form is a single form and contains general data including a total
amount. The subform includes rows in which the user can breakdown the total
amount into pieces (and of course the total of the subform should equal the
breakdown of the subform).
What i would like is that the rows in the subform (can be more than one) are
all locked for editing (pessimistic locking), however I can not figure it out
how to do it. I can lock one row through a DAO recordset, but how can I lock
the other records in that recordset? (BTW I have record level locking
activated)
This is a piece of the code I am using
Dim myRS as recordset
set myRS = currentDB.openrecordset("SELECT * FROM TBL1 WHERE ID in
(...,...)",dbopendynaset,dbconsistent,dbpessimistic)
set myForm.recordset = myRS
-> So far so good, but now locking the records in the recordset!
myRs.edit will lock the currentrecord, but moving to another records will
remove the lock from the previous record. So how can I lock another record in
the recordset while the previous records keeps locked?!
Hope my question is clear and that it is possible
TIA
I have the following question. In a database I have a form, with a subform.
The main form is a single form and contains general data including a total
amount. The subform includes rows in which the user can breakdown the total
amount into pieces (and of course the total of the subform should equal the
breakdown of the subform).
What i would like is that the rows in the subform (can be more than one) are
all locked for editing (pessimistic locking), however I can not figure it out
how to do it. I can lock one row through a DAO recordset, but how can I lock
the other records in that recordset? (BTW I have record level locking
activated)
This is a piece of the code I am using
Dim myRS as recordset
set myRS = currentDB.openrecordset("SELECT * FROM TBL1 WHERE ID in
(...,...)",dbopendynaset,dbconsistent,dbpessimistic)
set myForm.recordset = myRS
-> So far so good, but now locking the records in the recordset!
myRs.edit will lock the currentrecord, but moving to another records will
remove the lock from the previous record. So how can I lock another record in
the recordset while the previous records keeps locked?!
Hope my question is clear and that it is possible
TIA