Chr Function syntax

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to add a special character to a text string using code. I have the unicode tag for my character, but cannot seem to get it to work. Can anyone give me some syntax advice?
 
Jim said:
I am trying to add a special character to a text string using code.
I have the unicode tag for my character, but cannot seem to get it to
work. Can anyone give me some syntax advice?

If you have the unicode value, use the ChrW() function instead of Chr().
 
This is just a quick test from the immediate window. Is this what you're
after?

?"string" & ChrW(0176) & "string"
string°string

--
Wayne Morgan
Microsoft Access MVP


Jim said:
I am trying to add a special character to a text string using code. I
have the unicode tag for my character, but cannot seem to get it to work.
Can anyone give me some syntax advice?
 
Thanks Guys, that looks great, one problem is that when I include letters in the unicode it busts. I am referencing a unicode list online, perhaps that is the problem. Note my code below:

Me!QuestSkipto = Me!QuestSkipto & ChrW(25B6) & " " & "Goto Q000" & vbCrLf
 
Jim said:
Thanks Guys, that looks great, one problem is that when I include
letters in the unicode it busts. I am referencing a unicode list
online, perhaps that is the problem. Note my code below:

Me!QuestSkipto = Me!QuestSkipto & ChrW(25B6) & " " & "Goto Q000" &
vbCrLf

"Letters in the unicode"? These should be numeric values. Is your list
giving you hexadecimal codes by any chance? Are you looking for the
character ? , which may or may not appear correctly in this posted
message but is a sort of right-pointing arrowhead? If so, your list is
giving you hexadecimal values and you can specify them in your code like
this:

Me!QuestSkipto = Me!QuestSkipto & _
ChrW(&H25B6) & _
" Goto Q000" & vbCrLf
 
Back
Top