Of course
Put the below in a module
Sub CheckPassword(formToOpen as string)
If dlookup("count(*)","UserT","password= '" & CStr(textpw) & "'") = 0 then
MsgBox "Sorry, Your Password is incorrect."
Else
DoCmd.Close acForm, "PasswordaddF", acNosave
DoCmd.OpenForm formToOpen
End If
End Sub