|
-
Apr 1st, 2004, 03:00 PM
#1
Thread Starter
New Member
compare form fields
This is easy, but I can't figure it out....a couple things. First, I have a connection with one of my databases that I am using to allow my users to change their password. I want to be able to have them confirm their password just to be sure they typed it in correctly. I have seen different ways of doing this but I just want a simple comparison. Secondly, I have it set up where they have to enter their old password, just to be sure. If the old password doesn't match the one in the database, it won't update. I want it to prompt them that they have made an error, and instead of going to the confirmation page, prompt them what their error was.
Thanks in advance
-
Apr 1st, 2004, 03:11 PM
#2
Frenzied Member
you could provide one text box first, and use an IF statement and if if matches, make visible, on the same form, a second text box and test those for equality.
VB Code:
'This would be in a button_click event
frmDialog.showdialog
'this would be in another _click event on frmDialog
dim OldPass as string = textbox1.text
if pass <> [whats on the DB] then
'provide an error here
else
textbox2.visible = true
buttonChangePass.visible = true
end if
'This would be a _click event for a buttonChangePass
if textbox1.text <> textbox2.text
'provide an error here
else
'Make the changes on the database according to text box1 or 2
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|