INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS
Come Join Us!
Are you a
Computer / IT professional?
Join Tek-Tips now!
- Talk With Other Members
- Be Notified Of Responses
To Your Posts
- Keyword Search
- One-Click Access To Your
- Automated Signatures
On Your Posts
- Best Of All, It's Free!
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.
Partner With Us!
"Best Of Breed" Forums Add Stickiness To Your Site
(Download This Button Today!)
"...I've gotten solutions within a day - it saved a lot of time and actually got me one ATTABOY from my boss..."
Where in the world do Tek-Tips members come from?
Create a tool box that lets user enter special characters
Posted: 15 Mar 04
It is relatively easy to create a toolbox on the form that will insert special characters into a textbox.
1) Create the desired number of command buttons on your form for each special character, e.g., cmdTrademark, cmdCopyright, cmdPoundSign, etc. Leave the caption of these buttons blank, because they will be set in the Open Event for the form with this code:
cmdTrademark.Caption = chr(174)
cmdCopyright.Caption = chr(169)
cmdPoundSign.Caption = chr(163)
(to see the complete set of characters, go into Visual Basic help and search for Character Set 128 - 255)
2) The clicked event for each command button will append the special character to the text box desired. For instance, to insert the trademark symbol into a text box called txtInputText, you would use this code:
txtInputText.value = txtInputText & Chr(174) 'trademark
'note the use of the "value" property, not "text"
3) By neatly organizing your command buttons and placing a label at the top (such as "Insert Special Character"), you will end up with a very user-friendly method of adding special characters.
HTH, Randy Smith
Back to Microsoft: Access Forms FAQ Index
Back to Microsoft: Access Forms Forum
Join Tek-Tips® Today!
Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.
Here's Why Members Love Tek-Tips Forums:
- Talk To Other Members
- Notification Of Responses To Questions
- Favorite Forums One Click Access
- Keyword Search Of All Posts, And More...
Register now while it's still free!
Already a member? Close this window and log in.
Join Us Close