Randomblink
The Irreverent Reverend
- Local time
- Today, 11:56
- Joined
- Jul 23, 2001
- Messages
- 279
Here is the code I have so far:
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...
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...