Check if database is readonly?

  • Thread starter Thread starter Boss
  • Start date Start date
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
 
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
 
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
 
Back
Top