473,408 Members | 2,477 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

How to insert ASCII 30 into a label caption using VBA

Seth Schrock
2,965 Expert 2GB
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.
Mar 18 '14 #1
8 8482
zmbd
5,501 Expert Mod 4TB
Seth,
ASCII(30) is a record seperator and is usually a non-printable
http://www.ascii-code.com/

So what is it that you are actually wanting to do?
Mar 18 '14 #2
Seth Schrock
2,965 Expert 2GB
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 Images
File Type: jpg ascii list.jpg (149.4 KB, 7046 views)
Mar 18 '14 #3
Seth Schrock
2,965 Expert 2GB
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.
Mar 18 '14 #4
zmbd
5,501 Expert Mod 4TB
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 (^_^)
http://en.wikipedia.org/wiki/ASCII


As for using the unicode, that might be your best bet.


EDIT>>
Seth, we've already been thru this here:
http://bytes.com/topic/access/answer...n-arrows-label
Mar 18 '14 #5
Seth Schrock
2,965 Expert 2GB
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:
Expand|Select|Wrap|Line Numbers
  1. Me.WireDateTime_Label.Caption = strLabelCaption & " " & StrConv("▲", vbFromUnicode)
Attached Images
File Type: png ASCII Arrows.png (4.7 KB, 1008 views)
Mar 18 '14 #6
Seth Schrock
2,965 Expert 2GB
I got is using the unicode characters.
Expand|Select|Wrap|Line Numbers
  1. Me.WireDateTime_Label.Caption = strLabelCaption & " " & ChrW(9650)
Mar 18 '14 #7
zmbd
5,501 Expert Mod 4TB
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) (^_^) .
Mar 18 '14 #8
Seth Schrock
2,965 Expert 2GB
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.
Mar 18 '14 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Pavan Arise | last post by:
Hi all.. This may seem simple..but I am stuck here! I have a frame in which I have a label. I was trying to change the caption of that label via code (I mean at runtime & not design time). But...
1
by: sck10 | last post by:
Hello, I am pulling data from a SQL Server table. One field that is (varchar 4000) is used to show notes. I am using a FormView for showing and editing the data. When the form is in Item...
11
by: ericms | last post by:
Can anybody show me how to insert a CDATA section using XPathNavigator ? I have tried the follwing with no luck: XmlDocument docNav = new XmlDocument(); docNav.LoadXml(xmlString);...
4
by: Ryan | last post by:
I've got a little bit of code that runs when you enter data in a datasheet view (which is a subform of the form you are in) if rst!DateReceived >= 30 Then Forms!DisposalRecords.Label90.Caption =...
2
by: webbi | last post by:
I have a text box called txtAttirubte1 and an update button in FormA. I want to update the label caption for all label name Attribute1_Lable in FormB and FormC with the WORD I type in the FormA text...
1
by: zion | last post by:
Hello, How can I change label caption on page load ? Thanks
4
by: Annie Bender | last post by:
Wow, I finally got through my first VB "tutorial" project and everything works nice, except one userform label caption will only display as long as the Excel column it draws data from is set wide...
1
by: jonkillua | last post by:
hi guys, i'm creating a program that instead of using the print method to display the odd/even numbers, i want to display the result in label.caption. Im crazy about it, please help me. Private...
1
by: BranX | last post by:
I have a label on a worksheet. When I press a button on the same worksheet, the program should set the new label caption and do some other calculations. The problem is, that new label caption is...
0
by: jctgt | last post by:
Hello, I have this: Private Sub Form_Load() Dim oXLApp As Excel.Application 'Declare the object variables Dim oXLBook As Excel.Workbook Dim oXLSheet As Excel.Worksheet Set oXLApp = New...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.