Help With Simple Passworded Form

D

dan.cawthorne

Hi all,

Need Some Help With A Simple Password Form

What a I Have Is Single Field Table, With One Record In It The Field
is Called [Password] table is also called "Password"

which ive created a form that represents this table, so the admin can
change the password if needed at ease.


With on My Main form "ProjectsMenu" i have Button that Opens A form
called "Project_Password_Dailog"

On This form i have a Unbound Text Box Named "txtpassword" Which Has
its Input Mast Set to *****

Then I Have a Two Command Buttons,

One Called Cancel and Brings The User Back to The Mainform,"

Second Button is To Open a Form Called "Anaylsis_Create_Dialog"

What Would Be The Code I Write In the On Click Event Section Thats
Allows Me To Open This Form "Anaylsis_Create_Dialog" Only When The
Password Enterted in the unbound text box matches the Password stored
in the password Table?

Any Help Would Be Really Appreciated,

Regards
 
G

Guest

I've seen this posting before, so I am guessing no one was able to answer
this. Here's my suggestion.

If you aren't concerned about users and passwords, then create an ID (number
format) in the table with the password (we will assign the ID to 1). On the
onclick event of the button enter:

if me.textbox = dlookup("[Password]","[Password Table]","[ID] = 1") then

Docmd.close

Dim stDocName As String
Dim stLinkCriteria As String

St DocName = "name of the form you want to open"
Docmd.openForm StDocName, , , StLinkCriteria

else
MsgBox("The password is no good!")
Docmd.quit

End if
 
D

dan.cawthorne

I've seen this posting before, so I am guessing no one was able to answer
this. Here's my suggestion.

If you aren't concerned about users and passwords, then create an ID (number
format) in the table with the password (we will assign the ID to 1). On the
onclick event of the button enter:

if me.textbox = dlookup("[Password]","[Password Table]","[ID] = 1") then

Docmd.close

Dim stDocName As String
Dim stLinkCriteria As String

St DocName = "name of the form you want to open"
Docmd.openForm StDocName, , , StLinkCriteria

else
MsgBox("The password is no good!")
Docmd.quit

End if

Need Some Help With A Simple Password Form
What a I Have Is Single Field Table, With One Record In It The Field
is Called [Password] table is also called "Password"
which ive created a form that represents this table, so the admin can
change the password if needed at ease.
With on My Main form "ProjectsMenu" i have Button that Opens A form
called "Project_Password_Dailog"
On This form i have a Unbound Text Box Named "txtpassword" Which Has
its Input Mast Set to *****
Then I Have a Two Command Buttons,
One Called Cancel and Brings The User Back to The Mainform,"
Second Button is To Open a Form Called "Anaylsis_Create_Dialog"
What Would Be The Code I Write In the On Click Event Section Thats
Allows Me To Open This Form "Anaylsis_Create_Dialog" Only When The
Password Enterted in the unbound text box matches the Password stored
in the password Table?
Any Help Would Be Really Appreciated,

Thank you meyerryang
 

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

Similar Threads


Top