这里是代码时,它会弹出按钮上点击,但不接受输入密码,但只在文本格式。
| execobraPrivate Sub Form_Open(Cancel As Integer)
Dim PassWord As String
PassWord = InputBox("Enter password")
If PassWord = "welcome@123" Then
' Open Form
DoCmd.OpenForm "add/update tables form"
Else
MsgBox ("You're not authorized - now exiting")
DoCmd.Close acForm, "add/update tables form"
End If
End Sub