Secure Location:Create Workspace

Randomblink

The Irreverent Reverend
Local time
Today, 10:33
Joined
Jul 23, 2001
Messages
279
Here is the code I have so far:

Code:
Public Function GetMasterVersion() As String
    Dim wrkJet As Workspace
    Dim dbs As DAO.Database, cnt As Container
    Dim doc As Document, prp As Property

    ' Property not found error.
    Const conPropertyNotFound = 3270
    On Error GoTo GetSummary_Err
    
    Set wrkJet = CreateWorkspace("", "User", "")
    Set dbs = wrkJet.OpenDatabase("\\PW\engineering\wpdata\reports\Databases\Front_End_Databases\Tmpl_ProjectStatus.mdb")
    Set doc = dbs.Containers("Databases")!UserDefined
        GetMasterVersion = doc.Properties("ReplicaVersion")
        dbs.Close
        wrkJet.Close
    Set doc = Nothing
    Set dbs = Nothing

GetSummary_Bye:
    Exit Function

GetSummary_Err:
    If Err = conPropertyNotFound Then
            MsgBox "There is no Replica Version number assigned."
        Resume
    Else
        ' Unknown error.
        MsgBox Err.Description
        Resume GetSummary_Bye
    End If
End Function

I use this function to get the Version Number which I use to compare with the open databases version number... if different, I download and overwrite the current database with the master/template db.

The problem I am having is in security. The folder that the master is in is secured from users accessing it and harming it.

Can anyone think of anything I could do to still access the db without revealing it to anyone else? Make it invisible? Change certain settings? I am stumped... Thanks...
 
How can anybody access a secured directory if they do not have permission to access it?

You need to allow the users read only access to the directory. Do not leave your only copy of the master version out there "just in case". Copy your master version to the directory for the users to access. You could use a self extracting zip file and launch that to give the users the latest version.
 

Users who are viewing this thread

Back
Top Bottom