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:
  1. 'This would be in a button_click event
  2.  
  3. frmDialog.showdialog
  4.  
  5. 'this would be in another _click event on frmDialog
  6.  
  7. dim OldPass as string = textbox1.text
  8.  
  9. if pass <> [whats on the DB] then
  10.  
  11. 'provide an error here
  12.  
  13. else
  14.  
  15. textbox2.visible = true
  16. buttonChangePass.visible = true
  17. end if
  18.  
  19.  
  20. 'This would be a _click event for a buttonChangePass
  21.  
  22. if textbox1.text <> textbox2.text
  23.  
  24. 'provide an error here
  25.  
  26. else
  27.  
  28. 'Make the changes on the database according to text box1 or 2