I'm trying to insert an up arrow (ASCII 30) into my label caption using VBA. In researching online I discovered that I could do it manually by holding the ALT key and then keying in 30 on the number pad. This works perfectly. However, if I try to concatenate Chr(30) to the end of the existing caption in VBA, it just puts a space. Surely if I can do it manually, I should be able to do it using VBA, but I just can't figure out how.
How to insert ASCII 30 into a label caption using VBA
Collapse
X
-
Tags: None
-
Seth,
ASCII(30) is a record seperator and is usually a non-printable
A complete list of all ASCII codes, characters, symbols and signs included in the 7-bit ASCII table and the extended ASCII table according to the Windows-1252 character set, which is a superset of ISO 8859-1 in terms of printable characters.
So what is it that you are actually wanting to do? -
I'm not wanting to separate records, I'm wanting to display it (as well as ASCII 31). There is a symbol related to both. Again it worked when I typed it manually. I just want to automate that if possible.Attached FilesComment
-
The other option would be to concatenate some unicode characters (U+25B2 & U+25bc) instead of the ASCII characters, but I couldn't get that to work either using the StrConv() function. All I got was a mess of weird symbols.Comment
-
Seth, 30 and 31 are non-printables in the full ASCII standard.
The image you attached is the IBM modified graphics code which is NOT an ASCII implementation.
Look at your inserted image for CHR(10) which is a BackLit-Circle - now we KNOW that this is the line feed in ASCII
Look at your inserted image for CHR(13) which is a Musical 1/8th note - now we KNOW that this is the carrage return in ASCII
This is old school stuff, I cut my programming teeth on ASCII (^_^)
As for using the unicode, that might be your best bet.
EDIT>>
Seth, we've already been thru this here:
Last edited by zmbd; Mar 18 '14, 04:01 PM.Comment
-
Well, Access recognizes 30 and 31 as symbols when entered manually (see attached). How it works I don't know, but it does display as I'm wanting.
As for using the unicode method, how do I do it? This is what I tried:Code:Me.WireDateTime_Label.Caption = strLabelCaption & " " & StrConv("▲", vbFromUnicode)Attached FilesComment
-
I got is using the unicode characters.Code:Me.WireDateTime_Label.Caption = strLabelCaption & " " & ChrW(9650)
Comment
-
That code worked in my test database.
As for using the alt+30; alt+030; alt+0030 to directly enter the block-up, it doesn't work on my version of ACC, I tried Times New Roman, Block, etc.. for the fonts and none of these worked for me; however the bell did ring chr(7) (^_^) .Comment
-
I'm using Access 2010, Calibri font to get that screen shot. The website I got the key combination from was Insert ASCII or Unicode Latin-based symbols and characters and it says it applies to Access 2007.
Another piece of strange behavior for Access I guess.Comment
Comment