Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
'# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #'
' '
' Copy the following into the calling database's StartUp Form '
' Private Sub Form_Open() '
' If CurrentUser() = "Developer" Then '
' If MsgBox("Change Startup property settings ?", vbYesNo ) = vbYes Then '
' Call SetStartupProperties() '
' End If '
' End If '
' End Sub '
' '
' Private Sub SetStartupProperties() '
' Const dbText As Long = 10 '
' Const dbBoolean As Long = 1 '
' Dim dbs As Object '
' Set dbs = CurrentDb '
' ChangeProperty "StartupForm", dbText, "frmStartUp", dbs '
' ChangeProperty "StartupShowDBWindow", dbBoolean, True, dbs ' False '
' ChangeProperty "StartupShowStatusBar", dbBoolean, True, dbs '
' ChangeProperty "AllowBuiltinToolbars", dbBoolean, True, dbs ' False '
' ChangeProperty "AllowFullMenus", dbBoolean, True, dbs ' False '
' ChangeProperty "AllowBreakIntoCode", dbBoolean, True, dbs ' False '
' ChangeProperty "AllowSpecialKeys", dbBoolean, True, dbs '
' ChangeProperty "AllowBypassKey", dbBoolean, True, dbs ' False '
' MsgBox "DB Properties Have Been Set for developer use .. ." '
' End Sub '
' '
' Then in a Sub that will always runs when the database closes down '
' ( EG. frmMainMenu.Close ) '
' '
' Private Sub Form_Close() '
' If CurrentUser() = "Developer" Then '
' If MsgBox("Secure database using Startup property settings ?", vbYesNo ) _ '
' = vbYes Then '
' Call ReSetStartupProperties() '
' End If '
' End If '
' End Sub '
' '
' Private Sub ReSetStartupProperties() '
' Const dbText As Long = 10 '
' Const dbBoolean As Long = 1 '
' Dim dbs As Object '
' Set dbs = CurrentDb '
' ChangeProperty "StartupForm", dbText, "frmStartUp", dbs '
' ChangeProperty "StartupShowDBWindow", dbBoolean, False, dbs '
' ChangeProperty "StartupShowStatusBar", dbBoolean, True, dbs 'If St'Bar used in db '
' ChangeProperty "AllowBuiltinToolbars", dbBoolean, False, dbs '
' ChangeProperty "AllowFullMenus", dbBoolean, False, dbs '
' ChangeProperty "AllowBreakIntoCode", dbBoolean, False, dbs '
' ChangeProperty "AllowSpecialKeys", dbBoolean, False, dbs '
' ChangeProperty "AllowBypassKey", dbBoolean, False, dbs '
' MsgBox "DB Properties Have Been Set into secure mode .. ." '
' End Sub '
'# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #'
Function ChangeProperty(strPropName As String, varPropType As Variant _
, varPropValue As Variant, dbs As Object) As Integer
Dim prp As Variant
Const conPropNotFoundError = 3270
On Error GoTo Change_Err
dbs.Properties(strPropName) = varPropValue
ChangeProperty = True
Change_Exit:
Exit Function
Change_Err:
If Err = conPropNotFoundError Then ' Property not found.
Set prp = dbs.CreateProperty(strPropName, _
varPropType, varPropValue)
dbs.Properties.Append prp
Resume Next
Else
' Unknown error.
ChangeProperty = False
Resume Change_Exit
End If
End Function