Question Password Protect Access 2007 form.

mcclunyboy

Registered User.
Local time
Today, 10:41
Joined
Sep 8, 2009
Messages
292
Hi,

I have a few forms I have password protected. This works fine because I use an input box on form load which asks for the password. however input boxes do not easily allow you to mask the input. This code was downloaded from the internet and changed to suit my application.

How can I replicate what I currently have but masking the input, I suspect I need to create a new form with a text box and a button but I don't know how to code VB so I am not sure what to do.

At the minute I have a table which contains the keycode and I just need to compare the text boxes contents to this (or a set value in the code if thats easier)
 
I would use a form to collect the password.

Set the text box's input mask to: password
This will make it display an * for each typed letter.


I will see if I can find you an example.
 
Hi,

Thanks

I only intend to allow 1 user (or group of users under who know 1 passowrd) into the forms so I don't need security groups/user information.

I copied the login form, deleted parts i didn't need ...got most of it working.

However the Dlookup will not compare the password to input string. It will not find the table although I am certain I have spelt it correctly. The table I am comparing to only has 1 field with 1 entry...the password...

Any idea? It works fine if I use strPassword = "password" but if I add strPassword = dlookup... it won't work.
 
hi i am trying to do the same sort of thing, i want multiple users and multiple logins but how would i do this? i have downloaded your sample :) but how would i implement this into mine?
have u got a table with all the user names and passwords? and how do you look these up thanks
 
Hi,

In theory you could just copy your users into the tbl in the example and edit the table with new passwords and the relevant security group....then edit the code so it opens the form you want.

Thats the easy option anyway. otherwise you'll need to edit more of the code - im failing at that just now lol.
 
Hi,

Thanks

I only intend to allow 1 user (or group of users under who know 1 passowrd) into the forms so I don't need security groups/user information.

I copied the login form, deleted parts i didn't need ...got most of it working.

However the Dlookup will not compare the password to input string. It will not find the table although I am certain I have spelt it correctly. The table I am comparing to only has 1 field with 1 entry...the password...

Any idea? It works fine if I use strPassword = "password" but if I add strPassword = dlookup... it won't work.

To help you with your Dlookup issue, please post the VBA code you are trying to use.

My thoughts on about securing a database:

There is a lot of planning that should be done before implementing any security model.

I find it better to have every user log on. This way you can track what every user does.

When you form loads that you want to protect, check to see if the user has the proper permissions to open the form.

I find it better to have every user log on .

When you form loads that you want to protect, check to see if the user has the proper permissions to open the form.
 
Right here is what I have ::

PHP:
 strPWD = DLookup("Password", "tblllpgpassword")
 
Last edited:
Sorry about another post but I have uploaded a word document containing a screen dump of the error I am recieving and the code I am using.....please note the password choice for the example - i like fruit.
 

Attachments

Your problem is you have put the square brackets on the OUTSIDE of the quotes and it should be:

DLookup("[Password]", "tblllpgpassword")
 
ah well you live and learn.

At the minute the table only has 1 row with 1 column containing the password.

Without creating another table and just using the same code what do I add to the criteria of Dlookup for it to look into the 2nd row of the same told!?

Thanks Bob

EDIT -

I figured it out, I added another column as a key -using autonumber then in the criteria of dlookup just specified which row to look in.

THanks again Bob.
 
BobLarson, how did you get the password entry form to open up when the database opens up? I'm trying to do the same thing (password protect a form) but I need the "password form" to open up before the "protected form", I don't need it to open when the database opens...but curious how you did it.

thanks
 
BobLarson, how did you get the password entry form to open up when the database opens up? I'm trying to do the same thing (password protect a form) but I need the "password form" to open up before the "protected form", I don't need it to open when the database opens...but curious how you did it.

thanks

In 2007 go to the Round Office Button > Access Options > Current Database and select the form to open (startup form) from the dropdown.

In 2003 and prior, go to TOOLS > STARTUP > and select the form from the dropdown.
 

Users who are viewing this thread

Back
Top Bottom