Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Password Form 1

Status
Not open for further replies.

mickier

Programmer
Jul 5, 2001
17
US
First. I do not have my database Protected using Access Security.

I have some code in a MIAN form (on click of a button) that says: When this button is pushed, open the PASSWORD. In the PASSWORD FORM I have the string that is typed in assigned to a variable X and close the password form. Now, back to the code in the MAIN form---
I have a eval statement: If variable X = the realpassword, then allow access to this area, otherwise give nastygram message. However, the code just runs through without stopping. The code evaluates the variable before the person has had a chance to enter in the password and automatically executes the FAIL code. How do I stop it or make it pause and then restart after the person is done typing their password?

Or, am I going about this completely wrong. (Input box works but you can see the password that is typed in--I want ****s)
Thanks.
 
I have a password form like you. There is an unbound text box that is set to show ****. I have the following code on the after update to activate a button allowing someone into the config for my database.

Private Sub passtext_AfterUpdate()
If Me!passtext = "Password" Then
Me![open config].Enabled = True
Else
Me![open config].Enabled = False
End If
End Sub

Hope it helps! Zorro
 
Well, that WOULD apply, but.... I guess I left out an importamt fact. I want to use this password form on my different "secured" fields (sign-off fields) in my MAIN form. So, the password form need to assign it's input to a variable. And then my main form field will then assess the variable to determine if the person id allowed in the sign-off field or not.

The variable part is working. BUT...the variable assessment part is not, because the code (from the on-enter field on the MAIN form) runs before the person gets a chance to enter their password into the PASSWORD Form.

Hope this clarifies the problem.
mickie
 
Would it not be better to place the variable assessment code in a procedure in the password form, not the main form. I.e. test the password, perhaps on clicking the OK button, but also pass it to the variable for later use. This should stop the code running through before the user puts in a password. Have fun! :eek:)

Alex Middleton
 
ON the MAIN FORM, I have about 18 different sign-off fields. When someone wants to sign off, they click into their sign-off field which opens the PASSWORD FORM. I need to assess the input of the PASSWORD against the field they are trying to enter. If I move the assessment code to the PASSWORD Form, how can I determine what field the user just came from to show who they are and if the password they entered is correct.

I have this working with INPUT boxes now, but I'd like to use a dialog box with ***'s so no one can see what they type.
 
hi,
IN regards to your probelm about seeing the password in the input box, input boxes don't support the *** 's . A way around that is to create a password form. Set the input mask of a text box on an unbound form to Password in the properties. Also if you want it as a popup form select yes in the properties. Say no to record selectors, scroll bars and have the form style as dialog.
Make sure that after the password is validated that in the code somewhere that you have docmd.close to close the form as it will stay open on top of the other form that is opened and active.
hope this helps
viv
 
Presumably you would have code somewhere in the event procedures, say AfterUpdate, for the text boxes. You could use either a global variable or the OpenArgs argument when opening the passowrd form to pass the variable through for checking against the password entered. Have fun! :eek:)

Alex Middleton
 
Presumably you would have code somewhere in the event procedures, say AfterUpdate, for the text boxes. You could use either a global variable or the OpenArgs argument when opening the password form to pass the variable through for checking against the password entered. Have fun! :eek:)

Alex Middleton
 
I know this thread is old and may now be irrelavent, but I stumbled on to it looking for help w/ something else . . . .

You could have the password form open as a dialogue box. This will "pause" the code in the main form until the password form closes.

DoCmd.OpenForm "frmPassword", acNormal, , , , acDialog _________
Rott Paws
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top