Check if database is readonly?

B

Boss

Hi,

I am looking for a code which would open database in readonly mode by default.

Else... Some code whcih can tell the database is in which mode (Readonly,
exclusive, normal) etc

Thanks!
Boss
 
D

Dirk Goldgar

Boss said:
Hi,

I am looking for a code which would open database in readonly mode by
default.

You could create a shortcut to start Access and open the database while
specifying the /ro command-line option.
Else... Some code whcih can tell the database is in which mode (Readonly,
exclusive, normal) etc

Although I haven't tested this comprehensively, I believe you could check
the Updatable property of the database object returned by CurrentDb. As in:

If CurrentDb.Updatable Then
' the database is not read-only
Else
' the database is read-only
End If
 
B

Boss

Excellent..!!

I was trying to something like thsi but using wrong function of
me.recordset...

Thanks a lot for your help... you made my day...

Thx!
Boss
 

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