
Originally Posted by
ItsMe
You can adjust your DB to launch a form of your choice. This form needs to allow the users to move around in the program. You can also add code to hide other objects such as tables and queries from the users.
If you right click your Ribbon then choose "Customize Quick Access Toolbar" you can adjust settings that affect how your DB runs. Under "Current Database" there is an uoption to choose your "Display Form". This will launch a form of your choosing at startup. After setting this option, you can bypass the form opening by holding down the "Shift" key during startup.
You can take it step further and use VBA to show or hide various componants of Access.
To hide the entire Ribbon you can use the following. You can place it behind a couple of buttons' click events to see how it works.
'Hide the Ribbon
DoCmd.ShowToolbar "Ribbon", acToolbarNo
'Show the Ribbon
DoCmd.ShowToolbar "Ribbon", acToolbarYes
There are other features that you can disable or enable too. The best explanation how this works that I have found so far is here, starting at post # 4
https://www.accessforums.net/securit...lbar-3536.html
You will need to place a function in a standard module before the "ChangeProperty" function can be called. ChangeProperty is not a built in function but you can add it to your program.
Code:
Function ChangeProperty(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer
Dim dbs As Object, prp As Variant
Const conPropNotFoundError = 3270
Set dbs = CurrentDb
On Error GoTo Change_Err
dbs.Properties(strPropName) = varPropValue
ChangeProperty = True
Change_Bye:
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_Bye
End If
End Function