Help with code

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")
 
A

Alex Dybenko

if your table T-Password have only one row then:

If UCase(Forms!frmPassword!Text0) = dfirst("Password","T-Password") Then
 
G

George

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top