sorry, need a little more info regarding this suggestion
jn, please include the text of the previous post, when you reply. This is
because the previous post might have disappeared from the reader's
newsserver. When I read your sentence above, I had literally no idea what it
was about. I had to search back through old posts, to see what you were
replying to. That was not a productive use of my time
My comment was on Alex's code:
on error resume next
rst.edit
rst!<SomeName>=rst!<SomeName>
rst.update
if err <>0 then
msgbox "record is locked!"
end if
His suggestion is fine, with one exception. He is assuming that >any< error
from the rst.update, means that the record is locked. But that is not a safe
assumption. For example, autonumber fields can not be edited, so they will
return an error on the rst.update, regardless of whether the record is
locked >or not<. So I was pointing out to him, somewhat cruptically, that he
should check the error code before he concludes that the record is locked.
Somehing like:
rst.update
select case err.number
case 0 ' no error.
case 1234: msgbox "record is locked!"
case else ' some other error occurred.
end select
Of course, the proper number is not 1234. You'd have to find out the right
number (I don't have Access here to check).
HTH,
TC