ByPass key ms access 2016

Jan 26, 2017
Reaction score
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
DoCmd.OpenForm "Interface", acNormal, "", "", , acNormal

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads