|
If you are wrong, you should set the data environment of the form to the table for storing passwords. If you don't add the data environment, add a file name of use table at the beginning of the code. Then build text boxes and buttons on the form, in the click event of the button:
(Assume that the table name is: yh, the user name field is: account number, and the password field is: password)
if empty (thisform.text1.value) .or. empty (thisform.text2.value)
messagebox ("Please enter username and password", 16, "Error")
else
locat for account = trim (thisform.text1.value)
if found ()
if trim (thisform.text2.value) <> trim (password)
messagebox ("The account password is incorrect, please confirm and re-enter", 16, "wrong")
thisform.text1.value = ""
thisform.text2.value = ""
else
yh = trim (thisform.text1.value)
do form welcome
release thisform
endif
else
messagebox ("The account password is incorrect, please confirm and re-enter", 16, "wrong")
endif
endif |
|