How do you check if an access database is read-only?
I also want to add on: how do you know if an access DB is located on a drive on the network that is read-only to some users? Thanks.
u could test for error when trying to open the db VB Code: Private Sub Command4_Click() Dim db As Database On Error GoTo xit Set db = OpenDatabase("C:\data\vbworld\_TestData\demodbr.mdb") '. '. '. xit: If Err.Number = 3051 Then 'Read only MsgBox "Database is read only" Else MsgBox Err.Number & " " & Err.Description End If End Sub
Private Sub Command4_Click() Dim db As Database On Error GoTo xit Set db = OpenDatabase("C:\data\vbworld\_TestData\demodbr.mdb") '. '. '. xit: If Err.Number = 3051 Then 'Read only MsgBox "Database is read only" Else MsgBox Err.Number & " " & Err.Description End If End Sub
-= a peet post =-
Forum Rules