Record level locking

R

Ronald Dodge

How well does ADO work for record level locking with UNBOUND forms?

I have attempted to DAO coding on UNBOUND forms. Here's what I had the code
do:

After user tabs out of the Number field of the record and it's been
validated, code would then determine the edit mode of the current record via
DAO

User continues on filling out the form.

When user is complete with filling out the form, the user than updates the
data. -- It's at this point with DAO coding that I get the error message
"Update or CancelUpdate without AddNew or Edit". At the point of time the
code attempts to set the value of the first field in the record, the error
message arise. At this same point of time, the EditMode Property on the DAO
Recordset has the value of 1 or 2 depending on which mode the user went
into, which is consistent with editing the current record or adding a new
record respectively. Given this, I don't understand why I get the error
message. The only way I been able to get around the error message is to
setup a form class level Long variable, use it, and then update the
recordset at the point of time the user updates the data. However, by doing
this, there is no real record level locking in place, which can very well
create problems down the road. The error took place using DAO 3.60 on W2K
Pro, SP4, in AC02, SP2.
 

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