check backend is read-only

  • Thread starter Cyberwolf via AccessMonster.com
  • Start date
C

Cyberwolf via AccessMonster.com

I have a FE/BE db where the BE is part of MKS (a Documentation control
software.) I want to be able to check whether or not the BE is set to read-
only and then alert the user that they need to check out the file before
proceeding.

Is there a way to programatically check to see if the back-end is read-only
when the FE is opened?

TIA
 
B

BeWyched

Hi

I don't know of coding to specifically check the read-only value but a way
though would be to attempt to open the table for editing and capture the
error if the table is readonly.

On my system (Acc 2003) setting the readonly attribute of a table will throw
a '3051' error is the table is readonly (or locked by another user), so,

On Error Goto Err_Hnd
Set db = Opentable("path to the B/E")
Set db = Nothing
......
Err_Hnd:
If Err.Number = 3051 then ....


Cheers.

BW
 
Top