Read-Only

L

LAF

I am using the following code to open a MS Access database:
Set dbSave = DAO.OpenDatabase(Range("rngGVBid").Value, False, False
conPassword)

When someone tries to open a database file which they set to Read-Only
nothing happens. We don't want them to open a file that is Read-Only
but we want to give them a message that says their file is Read-Only.
How can we find out if a file is Read-Only before the OpenDatabas
statement
 
J

Jamie Collins

LAF said:
I am using the following code to open a MS Access database:
Set dbSave = DAO.OpenDatabase(Range("rngGVBid").Value, False, False,
conPassword)

When someone tries to open a database file which they set to Read-Only,
nothing happens. We don't want them to open a file that is Read-Only,
but we want to give them a message that says their file is Read-Only.
How can we find out if a file is Read-Only before the OpenDatabase
statement?

Without connecting to the database, I can't think of a way of testing
whether a .mdb file has its read only attribute flagged or is locked
for some other reason e.g. subject to workgroup security permissions.
Try posting to one of the MS Access newsgroups.

Jamie.

--
 
Top