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

Where can I find all of the ASCII characters

1. ASCII Table

Where can I find all of the ASCII characters

by  DougP  Posted    (Edited  )
There is a WEB page I put in my favorites
http://albrecht.ecn.purdue.edu/~jimm/web/ee467/ascii.html

Example:

1 = SOH
2 = STX
9 = TAB
27 = ESC
34 = " (Double quote)
39 = ' (single quote)
A = 65
etc

How to use this in Access:
The above numbers are usually put in Chr$(xx)
So
& Chr$(13) ' would add a Carriage return to a line.
Example of how to add a carriage return, line feed to a message box:
-------------------------------------------------------
Dim MyString As String
MyString = "this is Line 1" & Chr$(13) & Chr$(10)
MyString = MyString & "This would be line2" & Chr$(13) & Chr$(10)
MyString = MyString & "And this is line3"

MsgBox MyString, vbInformation, "Multi-Line Example"
----------------------------

sometimes itÆs necessary to add single quotes to a SQL statement
Dim MySQL As String
MySQL = "Select * From MyTable Where MyField = " & Chr$(39) & SomeVariable & Chr$(39)

So Chr$(39) is a single quote




Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top