AccessGuruCarl
Programmer
Hello All,
I have a vb app that does several things before rarring an .mdb file that is copied to a web server.
I need to check the dbs.Properties("StartupForm") and make sure it was set to the frm_Register and if not, change the startup property to "frmSecure" then display the database so the operator can secure it(set 'all the' startup properties).
The database uses a secured workgroup file as well!
I can easily do this in VBA....
Tried the following but getting error messages...
1st starts at As Database... Tried replacing with Object but ran into errors later.
Whats the correct way to declare a database?
Thanks...
AccessGuruCarl
Programmers helping programmers
you can't find a better site.
I have a vb app that does several things before rarring an .mdb file that is copied to a web server.
I need to check the dbs.Properties("StartupForm") and make sure it was set to the frm_Register and if not, change the startup property to "frmSecure" then display the database so the operator can secure it(set 'all the' startup properties).
The database uses a secured workgroup file as well!
I can easily do this in VBA....
Tried the following but getting error messages...
1st starts at As Database... Tried replacing with Object but ran into errors later.
Whats the correct way to declare a database?
Code:
Dim dbs As Database, prp As Variant, myWorkspace As Workspace
Dim strPropName As String
Dim strUser As String
Dim strPassword As String
MyUser = "TestUser1"
MyPassword = "AppleJacks"
DBEngine.SystemDB = "C:\TestFolder\secured.mdw"
Set myWorkspace = DBEngine.CreateWorkspace("New", "strUser", "strPassword")
Set dbs = myWorkspace.OpenDatabase("C:\TestFolder\Test.mdb")
strPropName = "StartupForm"
prp = dbs.Properties(strPropName)
If prp <> "Form.frm_Register" Then
MsgBox "Database StartUp Properties Not Set!"
' Add code to change db startup property
'Load db to set startup properties.
Else
'Create Setup File
'Rar and copy to website update folder
End If
Set myWorkspace = Nothing
Set dbs = Nothing
Thanks...
AccessGuruCarl
Programmers helping programmers
you can't find a better site.