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

unbound text box

Status
Not open for further replies.

HOMMER

Technical User
Apr 12, 2001
112
0
0
US
I have a unbound text box that i want to change the data in a table. I need to do this using vb. I have a password protect database using a login form this works great. but when i go to the change password form I am not sure how to change the data to the new password. I want using vb code to write in my table what ever is typed in the verity text box.

thanks
 
Hi Hommer,

In the form, in the general declarations section of the code window delcare a variable
dim password as string

Then in a new section paste this:

Private Sub Text1_KeyPress(KeyAscii As Integer)
password = password + Chr(KeyAscii)
End Sub

Replace text1 with the name of your verify password box. This function grabs each keypress on the keyboard as it happens, and pastes it together as a string. You can then save that in your database. The problem with this however is that if the user presses shift, or tabs out of the field, then that is stored in the srting too.....

Hope that answers your question
 
Is there a way around this? I just want the letters they type.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top