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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PASSWORD PROTECT FORMS 1

Status
Not open for further replies.

darlek

Technical User
May 9, 2001
27
GB
On a form i have a button that opens to another form,is there a way to put a simple password protection routine so that a user has to enter a password and then the button will activate the form opening.
can this be programmed into the button.
i.e if password = "PASSWORD" then form open.??
Thanks for any help.
 
Although you cannot password protect form as you could with tables, yes, you can add a password protection routine in your button.
I personally don’t like password protection, it can be a pain to implement and maintain.

Create a form to accept a password, have the form return the password.
Verify password
Open form or show error message.

Frm.Open(“password”)
sResponse = Frm.Wait()
If sResponse = validPassword Then
Frm2.Open(“myform”)
Else
MsgStop(“Error”,”Invalid password”
EndIf

You will need to add codes to replace what the user typed into *.

 
Another, possibly easier way to implement this is to place a dummy, password protected table in the Form 2 data model, or to password protect one of the tables already in the form 2 model. That way Paradox won't let the user open the form unless the correct password is entered. Remember if you are going to introduce passwords, you need a system to maintain them, reset them when people leave, ....
 
hi joe and ogriofa thanks for replies, by the way i do not use passwords this is a special case.
question jo I am not sure of where i am placing this code.
on myform 1 in afield box called password where "password" is entered.
or in the button.
or have i to place some code in myform2.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top