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

Textbox field update

Status
Not open for further replies.

djmc

Programmer
Jun 12, 2002
179
CA
I have a textbox and I would like to know how I can show the updated text as the user types in the textbox. i KNOW you can do this by appending each keystroke you type in but there are flaws in that method. (i.e if user highlights and deletes portion of the text it wont update correctly since it goes by keystrokes -> each del keystroke) And for somereason i cant output the txtbox variable to show the current text in the box. Can someone tell me why it does not work that way? I've only seen implementations where people append each character at a time as the user types into the box.
 
I'm guessing you want to have the text appear in another place on the form...

Try putting code on the OnKeyPress event of the control.

Me!displaytxt = Me!inputtxt

Shane
 
I did

Debug.Print Me!txtChainName

in the KeyPress event and it prints Null every time i type in text into the text box txtChainName
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top