"Boss" <(E-Mail Removed)> wrote in message
news:5F5933CE-6133-4A5B-BEA9-(E-Mail Removed)...
> 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
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)