How to know if data is locked/change pending before I update.

  • Thread starter Thread starter ThomasAJ
  • Start date Start date
T

ThomasAJ

I am using Recordsetclone to go thru say 10 flagged records of a form (which
has say 1000 records) and want to update some data in those 10 records. How
can I know that a record is being used by some else BEFORE I attempt an
update.

I go thru certain customers in a form and manualy tick a checkbox in say 10
of them for later 'batch' style processing. Then in the header of the form I
click on a button that use Recordsetclone to findnext the ticked records and
does some calcs and then updates. I do not want to 'process' that record if
someone else is using it.

Please do not ask "why don't you do the processing when you tick the check
box". There are many reasons.
 
On Wed, 2 Jan 2008 20:39:00 -0800, ThomasAJ

You don't know that ahead of time. And even if there was a way, that
would not tell you anything about the locked status one millisecond
later when your next statement executes. So you take the plunge and
handle any errors that might come up with a strong error handler. I
like the one that silently retries N times (going to sleep between
iterations), and only then asks the user what to do next.

-Tom.
 
Back
Top