I'm trying to figure out a database created by somone else. They are no longer around to manage the database. The database loads with the shift key disabled.
I have imported all the objects into a new database so I can study the code to find out where the "Escape" is to get into the background.
but the one thing that puzzles me is I get this error when I load the form...Compile error..." User Type not defined"
The error stops on Dim Mydb As Database Yet there is to "Database" type
Also I am curious, if I import all the objects, what doesn't come accross? Because I thought if I imported everything then the database would still open the same way. But it doesn't I get the error?
The database is heavily coded, and I can't post it
this is the procedure that errors which I figure is also the one that prevents me from getting into the background. Can anyone interpret it for me also?
Public Sub lockup(b As Boolean)
Dim Mydb As Database
Dim prpNew As Property
Dim i As Integer
Dim strprop(8)
' b = ((UNAM = "Joe") Or (UNAM = "other"))
'' b = True
' If b Then MsgBox "locks!" Else MsgBox "Unlocks!"
On Error GoTo Err_Property
strprop(0) = "StartupShowStatusBar"
strprop(1) = "AllowBuiltinToolbars"
strprop(2) = "AllowFullMenus"
strprop(3) = "AllowBreakIntoCode"
strprop(4) = "AllowSpecialKeys"
strprop(5) = "AllowBypassKey"
Set Mydb = CurrentDb()
For i = 0 To 5
Mydb.Properties(strprop(i)) = b
Next
Exit Sub
Err_Property:
' Error 3270 means property not found, so Create:
If DBEngine.Errors(0).Number = 3270 Then
Set prpNew = Mydb.CreateProperty(strprop(i), dbBoolean, b)
Mydb.Properties.Append prpNew
End If
Resume Next
End Sub
I have imported all the objects into a new database so I can study the code to find out where the "Escape" is to get into the background.
but the one thing that puzzles me is I get this error when I load the form...Compile error..." User Type not defined"
The error stops on Dim Mydb As Database Yet there is to "Database" type
Also I am curious, if I import all the objects, what doesn't come accross? Because I thought if I imported everything then the database would still open the same way. But it doesn't I get the error?
The database is heavily coded, and I can't post it
this is the procedure that errors which I figure is also the one that prevents me from getting into the background. Can anyone interpret it for me also?
Public Sub lockup(b As Boolean)
Dim Mydb As Database
Dim prpNew As Property
Dim i As Integer
Dim strprop(8)
' b = ((UNAM = "Joe") Or (UNAM = "other"))
'' b = True
' If b Then MsgBox "locks!" Else MsgBox "Unlocks!"
On Error GoTo Err_Property
strprop(0) = "StartupShowStatusBar"
strprop(1) = "AllowBuiltinToolbars"
strprop(2) = "AllowFullMenus"
strprop(3) = "AllowBreakIntoCode"
strprop(4) = "AllowSpecialKeys"
strprop(5) = "AllowBypassKey"
Set Mydb = CurrentDb()
For i = 0 To 5
Mydb.Properties(strprop(i)) = b
Next
Exit Sub
Err_Property:
' Error 3270 means property not found, so Create:
If DBEngine.Errors(0).Number = 3270 Then
Set prpNew = Mydb.CreateProperty(strprop(i), dbBoolean, b)
Mydb.Properties.Append prpNew
End If
Resume Next
End Sub