Help With Really 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


Dan
 
K

Keith Wilby

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,

Don't have your table and field names the same, suggest you change the table
name to "tblPassword".

If Me.txtMyTextBox = DLookup("Password","tblPassword") Then

But this approach can be VERY easily defeated by anyone with a little Access
knowledge.

Keith.
www.keithwilby.com
 
G

Guest

If IsNull(DLookup("[Password]", "Password", "[Password] = '" &
Me.txtPassword & "'")) Then
Msgbox "Incorrect Password"
Else
Docmd.OpenForm "Anaylsis_Create_Dialog"
End If
 
D

dan.cawthorne

If IsNull(DLookup("[Password]", "Password", "[Password] = '" &
Me.txtPassword & "'")) Then
Msgbox "Incorrect Password"
Else
Docmd.OpenForm "Anaylsis_Create_Dialog"
End If
--
Dave Hargis, Microsoft Access MVP

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,

Dan

Thank you both For Getting back to me,

Couldnt Get Yours To Work klatuu,

Got Yours To Work Kieth,

Just Noticed Though when i Reopen The Password it still holds The
Password in the Unbound Text Box, is there a Way of Clearing that?
 
K

Keith Wilby

Just Noticed Though when i Reopen The Password it still holds The
Password in the Unbound Text Box, is there a Way of Clearing that?

If you close the form then it should self-clear. Are you saying it doesn't?
 
D

dan.cawthorne

If you close the form then it should self-clear. Are you saying it doesn't?

Hi Keith

My Mis take The Form was Still Open Hidden Behind all the other forms
lol

I Just added extra line of code to close the form when the correct
Password was Entered Lol

And works fine,

Can You Explain To Me Why Some Of My Posts Disappear on here?

I Posted another Post Friday and had one reply, and come to check it
out the post it missing

And Ive Tried Searching my Email address for all my Post Cant FInd
It,

Its a Report Question,

I Have To Sets of Filters on my Form, A-Z Ones Via a macro,

I want to Be Able to Open The Report in preview mode and show all the
A Contacts if the form is filtered To Just A Contacts.

the code i was giving didnt quite give me what i want.

DoCmd.OpenReport "Rrpt_Suppliers", acViewPreview, , "[Company] Like
'A*'"

That Code Just Filters all the Companys With "A" Regardless of What
Letter I Filter Out on form,

the only Why I See That Working is Having 26 Report Buttons Set up,

Do you Know another way?

Secondly i

Have a List Box "List0"

With an Marco In the After Update.

Which the macro is as a WHERE Condition

[CompanyID] In (SELECT Suppliers.CompanyID
FROM Suppliers INNER JOIN Supplier_Service_Link ON
Suppliers.CompanyID=Supplier_Service_Link.CompanyID
WHERE (((Supplier_Service_Link.ServiceID)=forms!suppliers!List0));)


The List Box Has Loads of different services Listed in it Like
Ductwork
and this list box filters companys Via Service

I would also Like to create report showing all Companys That are
Filtered by service.
 

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