Private 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
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)