ByPass key ms access 2016

Joined
Jan 26, 2017
Messages
1
Reaction score
0
I would like to do something like this but I not sure how. What I am say is if the bypass key is used on opening then show userform and command buttons if not then basically do as normal set up
Private Sub Form_Open(Cancel As Integer)
If (Control.ModifierKeys And Keys.Shift) = True Then
DoCmd.OpenForm "Interface", acNormal, "", "", , acNormal
Forms!Interface!Command0.Visible = True
Forms!Interface!Command1.Visible = True
Forms!Interface!Command2.Visible = True
Forms!Interface!Command3.Visible = True
Forms!Interface!Command23.Visible = True
Forms!Interface!Label4.Visible = True
Else
DoCmd.OpenForm "Interface", acNormal, "", "", , acNormal
Forms!Interface!Combo5.SetFocus

Forms!Interface!Command0.Visible = False
Forms!Interface!Command1.Visible = False
Forms!Interface!Command2.Visible = False
Forms!Interface!Command3.Visible = False
Forms!Interface!Command23.Visible = False
Forms!Interface!Label4.Visible = False

End If
End Sub
 
Back
Top