Can't use "Diamond" in VBA, can't program a replace...

B

BlueWolverine

Hello,
MS ACCESS 2003 on XP PRO.

I have a weird situation. First I want to say that I COULD use a new
symbol, but I've already published once using the Diamond.♦ (U+2666 in the
character map, next to the clubs, hearts and spades). I'd REALLY like to use
the Diamond. If I HAVE to switch, I'll work that out.


Anyway, here's the problem. I have a report in access that uses the
aforementioned DIAMOND to flag some aspect of the line item. It's a lot
better than a TRUE or FALSE next to each item. :)

I am now writing code to export that same data in a similar-ish format in
excel because everyone wants to be able to edit the documents I send. I have
no control over this and I can't say LIVE WITH IT. There's good and bad to
this. Anyway, in the report the diamonds show up just fine. In the query,
it shows up just fine. When I export the query, the Diamonds become ?

So I write in code to replace (excel's ctrl+h) to change the ? to diamonds.
Well I can't paste the diamond into the VBA editor, it changes it to... you
guessed it, a ?

Well I figure I'll give Chr() a chance. I find that Diamond is U+2666 so I
try Chr(2666) and I get an error saying the argument is outside the range for
this function.


I guess my question is multifold.

Does anyone know how to stop the diamond conversion problem?
Does anyone know the character code for diamond, or better yet a list of all
character codes?


Can anyone help me keep my diamond? Like I said at the beginning, I could
change to another symbol, but I REALLY don't want to.

Thank you so much/.
 
D

Dorian

The 'diamond' is a representation of a character in the ASCII character set.
It depends on the selected font which character is shown for the ascii
valiue. In different fonts it will be a different character. Only the
standard characters like A-Z, a-z, 0-9 and things like punctuation characters
will be the same in most fonts.
You would be better off in using a standard character rather than a special
character.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top