ضع هذا الكود في حدث نقر الزر
Dim stLinkCriteria As String
Dim str_Title, str_Prompt As String
'Dim mypass As Integer
'mypass = DLookup("[Password]", "tblUsers")
str_Title = "كلمة المرور"
str_Prompt = "ادخل كلمة المرور"
If InputBox(str_Prompt, str_Title) = 123 Then '123 or mypass
stDocName = "MainForm"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Else
MsgBox "ادخال غير صحيح", , "لا يمكنك الدخول"
Exit Sub
End If