Open database Exclusive

  • Thread starter Thread starter Norm
  • Start date Start date
N

Norm

Hi,

I hope this is the right group. I have a VB program that opens an Access
database and was wondering if I open it in Exclusive mode will any other
users that try to open it get an error code? If so does anyone know what the
error number would be or should I just trap all errors.

I am assuming that when open in Exclusive mode it would be locked to prevent
any other changes done to the database until closed.

I am trying to avoid the left over .ldb files when someone closes the
program improperly.

Thanks,
Norm

--
Norm

Don't blame me, my programming is
self-taught and my teacher was not
very experienced. :-)

normfowler_don't (e-mail address removed)
 
The error most often raised would probably be 3051. Another one might be
3006.

I would just use an error handler like:

Error_Handler:

MsgBox "Another user has exclusively open the database. Please try
later", vbOKOnly, "Error"
DoCmd.Quit
 
Arvin said:
The error most often raised would probably be 3051. Another one might
be 3006.

I would just use an error handler like:

Error_Handler:

MsgBox "Another user has exclusively open the database. Please try
later", vbOKOnly, "Error"
DoCmd.Quit

Thanks very much Arvin.

--
Norm

Don't blame me, my programming is
self-taught and my teacher was not
very experienced. :-)

normfowler_don't (e-mail address removed)
 
Back
Top