Smart questions
Smart answers
Smart people
Join Tek-Tips Forums
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Duncanmcl (Programmer) (OP)
4 Dec 07 9:27
Word defines the black down point triangle special character as alt X, or using character code 25bc. I'm trying to use same is Access in VBA, within an if statement on a procedure for streaming stock quote, that character being used as a negative if the change in stock value was negative. In Access using char(25bc) but get error....other has said char(9660) should work...but no...I get "?". How dor I display that character in Access VBA code??

Thanks in advance!!
Helpful Member!  traingamer (Programmer)
4 Dec 07 10:28
A google search found  Print special characters from VBA in another forum.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill

Duncanmcl (Programmer) (OP)
4 Dec 07 10:47
this is a pay for service...answer service....its $12/mth....I also searched on google and MSDN.....they illustrate only the most simple of examples....please try again
genomon (Programmer)
4 Dec 07 11:14
Obviously "25bc" is meaningless in VBA. First, here are common character representations:
http://www.alanwood.net/demos/ansi.html

I didn't see the character you want there; try copying it from character map (if you are a windows user) and evaluating it in code.

Sure, the early bird gets the worm, but the second mouse gets the cheese in the trap.

traingamer (Programmer)
4 Dec 07 12:52

Quote:

this is a pay for service...

Scroll to the bottom of the page for an example.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill

Duncanmcl (Programmer) (OP)
4 Dec 07 13:36
that example works to 255....and the down arrow is not within that range.....and #'s beyond that are not supported....to better see my example....go to word....insert....symbol....and scroll down to black down arrow....that the one...its supported in word as alt x 25b2.....but im trying to use it within Access in VBA code?

Thanks for trying!!
traingamer (Programmer)
4 Dec 07 14:24
(tested)
Insert your special character into a table. e.g.
ID    Value
1    £
2    €


Do a Dlookup to get the value that you want and concatenate it with your answer.

CODE

chrEuro = DLookup ("[Value]", "[table2]", "[Id] = 2")
chrPound = DLookup("[Value]", "[table2]", "[Id] = 1")
There are probably other ways as well.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill

Remou (TechnicalUser)
4 Dec 07 14:47
Don't forget Charmap: choosing Start->Run and type Charmap should bring it up. You can get special characters using special fonts.
Duncanmcl (Programmer) (OP)
4 Dec 07 15:38
Traingamer:thanks...getting closer... As suggested , created table like your example, ID 1 value is ?, id 2 value ?, value  is a text field....the below dlookup yields ?? , both SUp and SDown are strings....when viewing table the arrows are OK....from code getting ??

SUp = DLookup("value", "unicode", "[ID]= 1")
SDown = DLookup("value", "unicode", "[ID]= 2")

MsgBox SUp & SDown

your thoughts?
traingamer (Programmer)
4 Dec 07 15:54
I use that code in a query or form and get the proper character(s). I am returning the value to a text box or to a query. I am using a variant rather than a string but that shouldn't make a difference.

CODE

Public Function getTest(intId As Integer) As Variant

getTest = Nz(DLookup("[Value]", "[table2]", "[Id] = " & intId), "")
 
End Function
VarUp = getTest(1)
Print or debug.print gives me a question mark rather than the triangle though.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill

Duncanmcl (Programmer) (OP)
4 Dec 07 16:13
Traingamer:thanks....IT WORKS CORRECTLY....WELL DONE....THE LAST ERROR (MINE) WAS DLOOKUP TABLE WAS WITHOUT []'S....

You are my hero!!
Duncanmcl (Programmer) (OP)
6 Dec 07 14:00
PHY: Your answer is what I was expecting..the other was a workarount..very limited description on the web about function chrw(), it clearly works...and is more logical for coding.....can you advise what its code means, concatenate hex? the following? into function CHRW()

traingamer (Programmer)
6 Dec 07 16:46
I knew there had to be an easier way smile

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close