Check if current record is being edited by another user

C

Cheese_whiz

Hi all,

I have some forms where I don't want the record selector visible, so the
little pencil that indicates a record is currently being edited by another
user doesn't show up. Is it possible to check that in vba?

Thanks,
CW
 
J

Jim Burke in Novi

I've never used this so I can't say it will do exactly what you want, but
there's a 'Record Locks' Form Property that you can set to 'Edited Record'. I
think that this will give a user a default Access error message telling them
the record is locked. I would think you could find out the error number for
that message, then in the form's On Current event you could code an On Error
statement, and check for that error number, and when that error comes up you
could display your own message in place of the default Access message. I'm
pretty sure the Record Locks property should work, but the part about
capturing that error for your own display I'm not sure at all. Like I said, I
haven't tried this!
 
C

Cheese_whiz

Thanks for the reply, Jim

I found something kind of similar to that about 8 pages deep in my 30th
google search. Of course, the idea is to indicate that the record is locked
before a user wastes time editing it, but the old post I saw I think was
indicating that you could try to update the record on the form's current
event which would throw the error if it were being edited and at least you'd
know, at the time you first entered the record, whether or not it was locked.

Anyway, I may have to play around with that idea a little more. I do
appreciate the response.

CW
 

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