Special character for Rx?

  • Thread starter Thread starter Jim Burke in Novi
  • Start date Start date
J

Jim Burke in Novi

I'd like to print the Rx symbol (Capital R with a line thru it like
pharmacies use). Couldn't find it in the standard Ascii special characters
list in Windows. Any idea if this is a printable symbol?
 
How do I get the unicode value into a table field? I've never dealt with
unicode before. Is there a standard way of assigning a Unicode value, e.g. x
= U'8478'?
 
Use the function ChrW():

SELECT chrw(8478) AS Expr1, chrw('&h211e') AS Expr2
FROM tableA
WITH OWNERACCESS OPTION;

However, it's not all font that is capable of displying that character. For
example, I have no problem with the above in a datagrid or on a report but I
don't see it in a message box (msgbox) or with the Debut.Print command.
Probably that I should change the default font for Access on my system.
 
How do I get the unicode value into a table field? I've never dealt with
unicode before. Is there a standard way of assigning a Unicode value, e.g. x
= U'8478'?

Here are 2 methods.
I recommend the first one as it will only effect the data entered via
one control on the form (which is how you should be entering data ....
not directly into a table).

Method 1):
Using a form for data entry, you could use something like this:
Code the Control's AfterUpdate event:
Me.[ControlName] = Replace([ControlName],"***",chrw(8478))

To use this, enter your text using *** where you wish the Rx to
appear, such as:

"The *** was .... etc".
will become
"The Rx was .... etc."

Or.... You could use AutoCorrect Options. This method will effect all
applications!

Method 2)
Set an unbound control on your form to:
=chrw(8478)
Open the form in Form View. The Rx character should be displayed.
Select and Copy the Control's value (the Rx symbol)
Then go to Tools + AutoCorrect Options.
Set Replace Rx to be replaced with the Rx symbol (Paste the Rx
character that you copied). Click Add. Click OK.
Delete that form's control.

Then simply type " Rx " where ever you wish the Rx to be placed.
Again, this AutoCorrect will effect all applications.
Change the Rx, if you wish, to any other combination of characters
that you think will never, ever, be used together normally.
 
Thanks, guys. In my case I actually only need the Rx symbol to print on a
report, but wanted to know in general terms how it worked. Thanks again.
 
Spoke too soon. I tried an unbound control with a control source of
=chrw(8478), just gives me a funny looking square shape. Do I need a
particular font? It defaults to Arial.
 
Should work without any problem. What version of Windows and of Access are
you using?
 
Windows XP, Access 2000. I have an unbound text box, Arial font, Control
Source is set to =chrw(8478), no format specified.
 
Sylvain Lafontaine said:
Should work without any problem. What version of Windows and of Access
are you using?


According to the Character Map application, that character is not defined in
the Arial font, nor in several others I've looked at. Sylvain, can you see
this character in Arial on your PC? Jim, I may be missing something, but I
think you have to identify a font that actually provides a definition for
that symbol. I'm not sure how you'd go about it, though. Further, it has
to be a font that is present on the computer that is running the
application, so unless this is only for your computer, or you have
sufficient control over the installation that you can distribute fonts with
it, you would want it to be one of the fonts that is commonly available.

As an alternative if you can't find such a font, you could capture the
character as an image and display it in an image control.
 
I originally looked at the character maps in Windows and couldn't find it
anywhere in there. That's why I posted this question. There has to be some
explanation for why Sylvaine can see it and I can't, possibly using fonts
other than the 'standard' Windows ones?
 
Windows XP, Access 2000. I have an unbound text box, Arial font, Control
Source is set to =chrw(8478), no format specified.

It works for me using Arial, Times New Roman, MS San Serif, etc.

Perhaps an Advanced Group Search of *Access* groups at
http://groups.google.com/
for chrW will turn up more information.
 
With Windows XP and Access 2003, I can see here using practically any font
that I've tried so far: if the symbol is not available under the testing
font, Access display it using some standard font (I don't know which one).
This works even if I put other characters before or after it; these other
characters are displayed using the chosen font.

The only fonts with which this don't are for some (but not all) that are not
True Type font.

I've also two "Arial Unicode MS" fonts, one which begin with the letter @ as
in "@Arial Unicode MS". Both work but the second display it rotated 90
degres counter-clockwise.

Notepad and Wordpad can display it but only by using the "Arial Unicode MS"
font, the one without the @.
 
According to the Character Map application, that character is not defined in
the Arial font, nor in several others I've looked at. Sylvain, can you see
this character in Arial on your PC? Jim, I may be missing something, but I
think you have to identify a font that actually provides a definition for
that symbol. I'm not sure how you'd go about it, though. Further, it has
to be a font that is present on the computer that is running the
application, so unless this is only for your computer, or you have
sufficient control over the installation that you can distribute fonts with
it, you would want it to be one of the fonts that is commonly available.

As an alternative if you can't find such a font, you could capture the
character as an image and display it in an image control.

Dirk,
Using Windows XP, Office 2002, I can't see it in Character Map on my
computer either, but in my database application, =chrw(8478) does
indeed display the Rx symbol in Form View, and copying it to
AutoCorrect works, using standard fonts.
It also works on my wife's Access 2003 application, without my finding
it in her Character Map either.
 
Sylvain Lafontaine said:
With Windows XP and Access 2003, I can see here using practically any font
that I've tried so far: if the symbol is not available under the testing
font, Access display it using some standard font (I don't know which one).
This works even if I put other characters before or after it; these other
characters are displayed using the chosen font.

The only fonts with which this don't are for some (but not all) that are
not True Type font.

I've also two "Arial Unicode MS" fonts, one which begin with the letter @
as in "@Arial Unicode MS". Both work but the second display it rotated 90
degres counter-clockwise.

Notepad and Wordpad can display it but only by using the "Arial Unicode
MS" font, the one without the @.


You're right; now I can see the character. I must have made some mistake
in the first test I performed.
 
character as an image and display it in an image control.
Using Windows XP, Office 2002, I can't see it in Character Map on my
computer either, but in my database application, =chrw(8478) does
indeed display the Rx symbol in Form View, and copying it to
AutoCorrect works, using standard fonts.
It also works on my wife's Access 2003 application, without my finding
it in her Character Map either.


You're right; now it works for me (Vista, A2K3). I must have made a
mistake before in my quick test.
 
It looks like for some reason this character isn't defined in my environment.
If I go to the Window Character map, check Advanced View, select the Unicode
Character Set, then type in 8478 in the 'Go To Unicode' box,it shows me some
other symbols. If I choose 'Unicode Subrange' in the Group By selection, I
can choose every single category in the Group By selection box and never see
the Rx symbol in any of the lists that are brought up. Some of the fonts that
were mentioned by someone, inlcuding Arial Unicode (?), are not defined on my
laptop. This isn't something I absolutely have to have, but I thought it
would be simple enough to get. Guess I was wrong!
 
"Lucida Sans Unicode" also has it directly in its character map.

Yes, if I set my character map to Lucida Sans Unicode and Search for
Prescription it does appear.

It also shows up in Arial Unicode MS

In both cases, I have not been able to pick it out of the list by
looking for it. If I didn't know that Rx stood for "Prescription",
these tired eyes would never have found it in the list.
 
Back
Top