Help with code

  • Thread starter Thread starter George
  • Start date Start date
G

George

I have a Password Form that when a password is typed in
the text box and if it matches what in my table "T-
Password" field name "Password" I would like it to open
the form. The problem is I can't figure out is the text
required to made it look at the table's field.

What should I replace the ????? with


If UCase(Forms!frmPassword!Text0) = "?????" Then
DoCmd.OpenForm "F-Fleet-Etc"
ElseIf UCase(Forms!frmPassword!Text0)
<> "?????" Then
MsgBox ("Incorrect Password")
 
if your table T-Password have only one row then:

If UCase(Forms!frmPassword!Text0) = dfirst("Password","T-Password") Then
 
Your suggestion works - now I can password any button and
create a screen to allow anyone who knows the current
password to change it.

Thanks
 
Back
Top