Exponents in ACC200 memo fields

G

GeoBrooks

With the publisher's permission, I have database tables from a runtime
application. The original application shows exponents in a memo field (e.g.,
10^-2 has -2 in superscript). The memo field in the table shows this as
10ß-2Û. I need to be able to create a report which shows the superscript.
How might this be done?
 
J

John W. Vinson

With the publisher's permission, I have database tables from a runtime
application. The original application shows exponents in a memo field (e.g.,
10^-2 has -2 in superscript). The memo field in the table shows this as
10ß-2Û. I need to be able to create a report which shows the superscript.
How might this be done?

Access 2000 I presume? Unfortunately that version doesn't support non-ASCII
characters in textboxes. You will need to get a third-party "Rich Text Format"
control. There are several, one that has gotten good reviews is Stephen
Lebans':

http://www.lebans.com/richtext.htm

John W. Vinson [MVP]
 
G

GeoBrooks

Thanks for your reply. I saw a reference to that and had installed it. I'm
surely missing something because I didn't see any difference. Other than
that RTF2 is listed as a registered ActiveX control. [Guess who doesn't yet
understand these things yet!]

And yes, it's Access 2000.

George
 
T

Tom Wickerath

Hi George,

You need to add the RTF2 control to your report, and bind it (set it's
control source) to your memo field. In report design view, click on Insert |
ActiveX Control...
Tap the "R" key however many times it takes to select the RTF2 control. Then
click on the OK button on the Insert dialog. Reposition and resize the
control as appropriate. Click on View | Properties (or <ALT><Enter>) to
display the Properties dialog, if it is not already displayed. You should see
"ActiveX Control: RTFxx" in the blue title bar of the properties dialog, if
you have this new control selected. Switch to the Data tab of the Properties
dialog. Select the memo field as the Control Source.


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
G

GeoBrooks

Tim,

This I have done. Curiously the control did not show the contents of the
field. So I have some more fooling around to do.

A question: the field contents currently contain things like 10ß-2Û. Will
the RTF control convert this to look like 10-2 (with -2 as superscript)? Or
am I up the wrong creek here?

George

Tom Wickerath said:
Hi George,

You need to add the RTF2 control to your report, and bind it (set it's
control source) to your memo field. In report design view, click on Insert |
ActiveX Control...
Tap the "R" key however many times it takes to select the RTF2 control. Then
click on the OK button on the Insert dialog. Reposition and resize the
control as appropriate. Click on View | Properties (or <ALT><Enter>) to
display the Properties dialog, if it is not already displayed. You should see
"ActiveX Control: RTFxx" in the blue title bar of the properties dialog, if
you have this new control selected. Switch to the Data tab of the Properties
dialog. Select the memo field as the Control Source.


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

GeoBrooks said:
Thanks for your reply. I saw a reference to that and had installed it. I'm
surely missing something because I didn't see any difference. Other than
that RTF2 is listed as a registered ActiveX control. [Guess who doesn't yet
understand these things yet!]

And yes, it's Access 2000.

George
 
T

Tom Wickerath

Hi George,

I'm not sure about the editing capabilities that Stephen's control provides,
if any. I have a copy of Total Access Memo from FMS
(http://www.fmsinc.com/MicrosoftAccess/memo.html), which includes a rich text
editor. I'm not positive, but I think I've heard that FMS has no plans on
creating a version of this control for Access 2007, since the new .accdb file
format includes rich text capability (although it is HTML based).

I was able to enter ten to the minus 2 power easily enough, using the FMS
rich text editor. I added Stephen's rich text control to an existing report,
which already included the FMS control in order to get a side-by-side
display. Both ActiveX controls are displaying the identical content for me.

When I open the table to view the data, set focus to the memo field, and
then tap <Shift><F2> (to zoom), I see the following entry:

{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}}
{\colortbl ;\red0\green0\blue0;}
{\*\generator Riched20
5.40.11.2212;}\viewkind4\uc1\pard\qj\cf1\lang1033\f0\fs20 10\super -2
\nosupersub = 0.01\par
}

I then used some crazy font colors, and used the bold attribute. Here is the
new result:

{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}}
{\colortbl
;\red165\green42\blue0;\red0\green0\blue255;\red0\green147\blue0;\red0\green0\blue0;\red0\green255\blue0;\red0\green0\blue139;}
{\*\generator Riched20
5.40.11.2212;}\viewkind4\uc1\pard\qj\cf1\lang1033\b\f0\fs28 10\cf2\super -2
\cf3\nosupersub =\cf4 \cf5 0\cf4 .\cf6 01\cf4\b0\fs20\par
}

As you can see, my field contains quite a bit more than your's does, even
with a most basic entry. I copied the example you just provided: 10ß-2Û, and
pasted it into the field in the open table. When I view the record, I see
exactly what I pasted in, ie. nothing is superscript.


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
G

GeoBrooks

"I copied the example you just provided: 10ß-2Û, and
pasted it into the field in the open table. When I view the record, I see
exactly what I pasted in, ie. nothing is superscript"

This is what I was afraid of. My guess is that the original publisher
included a magic decoder ring in their application to reformat all of the
math expressions. [The database has test questions for a physics text.] I
was hoping to write a report to create a file to import into an open-source
course management tool.

While I could probably come up with code to do my own reformatting, the
return on time invested just ain't there.

Thanks for all the help. Guess I'll go back to the old style - make up my
own questions!

George
 
N

Neil

George,

You have to apply rich text formatting codes to your text. Your existing
text won't automatically get the formatting the way you want. There are
several ways to do this.

First is to use the methods that are a part of the rich text control you are
using (either Stephen Lebans', or FMS', or other); second is just to apply
the formatting codes yourself in code. Obviously the first would be simpler.

Keep in mind that when you use a rich text field, the field will contain the
actual formatting codes, in addition to the display text. You might want to
keep that in mind if your users are going to have to search on fields or
otherwise access the field contents.

(I currently have a rich text solution using FMS' control, and I use two
sets of fields -- one rich text, and, for each rich text, one plain text.
When the rich text field that the user edits is updated, the corresponding
plain text field is updated with the unformatted version of the text. Though
the user never sees the plain text version in the form, searches are
performed on the plain text field. But when the form is displayed in
datasheet view, I display the plain text fields, not the rich text fields.)

HTH,

Neil


GeoBrooks said:
Tim,

This I have done. Curiously the control did not show the contents of the
field. So I have some more fooling around to do.

A question: the field contents currently contain things like 10ß-2Û.
Will
the RTF control convert this to look like 10-2 (with -2 as superscript)?
Or
am I up the wrong creek here?

George

Tom Wickerath said:
Hi George,

You need to add the RTF2 control to your report, and bind it (set it's
control source) to your memo field. In report design view, click on
Insert |
ActiveX Control...
Tap the "R" key however many times it takes to select the RTF2 control.
Then
click on the OK button on the Insert dialog. Reposition and resize the
control as appropriate. Click on View | Properties (or <ALT><Enter>) to
display the Properties dialog, if it is not already displayed. You should
see
"ActiveX Control: RTFxx" in the blue title bar of the properties dialog,
if
you have this new control selected. Switch to the Data tab of the
Properties
dialog. Select the memo field as the Control Source.


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

GeoBrooks said:
Thanks for your reply. I saw a reference to that and had installed it.
I'm
surely missing something because I didn't see any difference. Other
than
that RTF2 is listed as a registered ActiveX control. [Guess who
doesn't yet
understand these things yet!]

And yes, it's Access 2000.

George
 
T

Tom Wickerath

Hi George,

As I indicated earlier, I wasn't really aware of any editing capabilities
that Stephen's control provides, but you may still be in luck! I just tried
a quick experiment, by creating some rich text in a Word document. It
included superscript, bold, color, underline and italicized text. I was able
to copy it from Word and paste it into a form in Access, using Stephen's Rich
Text control. I noticed one kind of strange behavior....the paste does not
want to occur the first time until one first presses on any key to put some
text (any text, such as a single letter) into the rich text control. At that
point, you can select the new text and hit <Ctrl><V> to paste the contents of
the clipboard, which you copied from MS Word. It works for me--give it a try.


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
 
G

GeoBrooks

Tom,

I am able to see the 'crazy' 10^-2, so at least I've got the control
installed properly and it CAN work.

But it really looks like far more work than I need to get properly formatted
data into the fields of the database.

Thanks again.

George

Tom Wickerath said:
Did you try copying and pasting in the rich text examples that I provided?
Just curious if those displayed okay for you.


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

GeoBrooks said:
"I copied the example you just provided: 10ß-2Û, and
pasted it into the field in the open table. When I view the record, I see
exactly what I pasted in, ie. nothing is superscript"

This is what I was afraid of. My guess is that the original publisher
included a magic decoder ring in their application to reformat all of the
math expressions. [The database has test questions for a physics text.] I
was hoping to write a report to create a file to import into an open-source
course management tool.

While I could probably come up with code to do my own reformatting, the
return on time invested just ain't there.

Thanks for all the help. Guess I'll go back to the old style - make up my
own questions!

George
 
N

Neil

Text control. I noticed one kind of strange behavior....the paste does not
want to occur the first time until one first presses on any key to put
some
text (any text, such as a single letter) into the rich text control. At
that
point, you can select the new text and hit <Ctrl><V> to paste the contents
of
the clipboard, which you copied from MS Word. It works for me--give it a
try.

Yeah, that's a known glitch. FMS even has a note about it on their website.
They have some workaround for the GotFocus event of the control.
 
G

GeoBrooks

Neil,

Thanks for your time on this. As it turns out, I will be the only user. I
was hoping to create an export for the college's course management system.
The net result is that it will take more time than I'm willing to spend to
get the old data tuned up to be useful.

So it's back to the old style of making up exams. Oh well.

George

Neil said:
George,

You have to apply rich text formatting codes to your text. Your existing
text won't automatically get the formatting the way you want. There are
several ways to do this.

First is to use the methods that are a part of the rich text control you are
using (either Stephen Lebans', or FMS', or other); second is just to apply
the formatting codes yourself in code. Obviously the first would be simpler.

Keep in mind that when you use a rich text field, the field will contain the
actual formatting codes, in addition to the display text. You might want to
keep that in mind if your users are going to have to search on fields or
otherwise access the field contents.

(I currently have a rich text solution using FMS' control, and I use two
sets of fields -- one rich text, and, for each rich text, one plain text.
When the rich text field that the user edits is updated, the corresponding
plain text field is updated with the unformatted version of the text. Though
the user never sees the plain text version in the form, searches are
performed on the plain text field. But when the form is displayed in
datasheet view, I display the plain text fields, not the rich text fields.)

HTH,

Neil


GeoBrooks said:
Tim,

This I have done. Curiously the control did not show the contents of the
field. So I have some more fooling around to do.

A question: the field contents currently contain things like 10ß-2Û.
Will
the RTF control convert this to look like 10-2 (with -2 as superscript)?
Or
am I up the wrong creek here?

George

Tom Wickerath said:
Hi George,

You need to add the RTF2 control to your report, and bind it (set it's
control source) to your memo field. In report design view, click on
Insert |
ActiveX Control...
Tap the "R" key however many times it takes to select the RTF2 control.
Then
click on the OK button on the Insert dialog. Reposition and resize the
control as appropriate. Click on View | Properties (or <ALT><Enter>) to
display the Properties dialog, if it is not already displayed. You should
see
"ActiveX Control: RTFxx" in the blue title bar of the properties dialog,
if
you have this new control selected. Switch to the Data tab of the
Properties
dialog. Select the memo field as the Control Source.


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

:

Thanks for your reply. I saw a reference to that and had installed it.
I'm
surely missing something because I didn't see any difference. Other
than
that RTF2 is listed as a registered ActiveX control. [Guess who
doesn't yet
understand these things yet!]

And yes, it's Access 2000.

George
 
T

Tom Wickerath

Hi Neil,

I can't say that I have experienced the copy and paste glitch with the FMS
rich text control. You previous reply to George gave me a clue as to why I
might be having the initial trouble using the copy and paste technique from a
Word document, into Stephen's control: "You have to apply rich text
formatting codes to your text."

If you add a plain text box control bound to the same memo field as
Stephen's rich text control, and then you press any key while the rich text
control has focus, you can see the rich text formatting codes being written
at that point.

If you have a link to the comment on FMS's site, I'm interested in reading
it. To be honest, I haven't used this control in any production
applications--more just out of curiousity, since I have FMS's Total Ultimate
Suite of tools.

I implemented the FMS rich text control in a database several years ago for
a beautiful young woman I was dating, and whom I married about 5 years ago.
Her birthname is Ye-Kyung, and she was born and raised in South Korea, so
English is her second language. This database was to help her learn common
American phrases, complete with the Korean translations. The database I
created, named "The Americanization of Ye.mdb" ("Ye" is a shortened form of
her name) included the FMS control for a memo field named Example.
Unfortunately, the FMS control did not provide support for Unicode, so she
could not have rich text with her Korean translations. But, the database was
a fun project that we enjoyed using (I guess I'm exposing my true geekiness
here!). My family (Mom, Stepdad, sister & two brothers) contributed lots of
phrases, a lot of which are not exactly "PC", but they're pretty funny
<smile>.


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
N

Neil

You might have better success just using MS Word and creating a macro to
find the codes, delete them, and apply superscript to the text in between.
That would be relatively simple to do. Once the text is converted in Word,
you can use copy and paste (either manually or with Automation) to paste
them it into rich text boxes and retain the superscripts. That would require
no rich text programming at all. Or you could just leave them in MS Word and
use that.


GeoBrooks said:
Neil,

Thanks for your time on this. As it turns out, I will be the only user.
I
was hoping to create an export for the college's course management system.
The net result is that it will take more time than I'm willing to spend to
get the old data tuned up to be useful.

So it's back to the old style of making up exams. Oh well.

George

Neil said:
George,

You have to apply rich text formatting codes to your text. Your existing
text won't automatically get the formatting the way you want. There are
several ways to do this.

First is to use the methods that are a part of the rich text control you
are
using (either Stephen Lebans', or FMS', or other); second is just to
apply
the formatting codes yourself in code. Obviously the first would be
simpler.

Keep in mind that when you use a rich text field, the field will contain
the
actual formatting codes, in addition to the display text. You might want
to
keep that in mind if your users are going to have to search on fields or
otherwise access the field contents.

(I currently have a rich text solution using FMS' control, and I use two
sets of fields -- one rich text, and, for each rich text, one plain text.
When the rich text field that the user edits is updated, the
corresponding
plain text field is updated with the unformatted version of the text.
Though
the user never sees the plain text version in the form, searches are
performed on the plain text field. But when the form is displayed in
datasheet view, I display the plain text fields, not the rich text
fields.)

HTH,

Neil


GeoBrooks said:
Tim,

This I have done. Curiously the control did not show the contents of
the
field. So I have some more fooling around to do.

A question: the field contents currently contain things like 10ß-2Û.
Will
the RTF control convert this to look like 10-2 (with -2 as
superscript)?
Or
am I up the wrong creek here?

George

:

Hi George,

You need to add the RTF2 control to your report, and bind it (set it's
control source) to your memo field. In report design view, click on
Insert |
ActiveX Control...
Tap the "R" key however many times it takes to select the RTF2
control.
Then
click on the OK button on the Insert dialog. Reposition and resize the
control as appropriate. Click on View | Properties (or <ALT><Enter>)
to
display the Properties dialog, if it is not already displayed. You
should
see
"ActiveX Control: RTFxx" in the blue title bar of the properties
dialog,
if
you have this new control selected. Switch to the Data tab of the
Properties
dialog. Select the memo field as the Control Source.


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

:

Thanks for your reply. I saw a reference to that and had installed
it.
I'm
surely missing something because I didn't see any difference. Other
than
that RTF2 is listed as a registered ActiveX control. [Guess who
doesn't yet
understand these things yet!]

And yes, it's Access 2000.

George
 
N

Neil

I can't say that I have experienced the copy and paste glitch with the FMS
rich text control. You previous reply to George gave me a clue as to why I
might be having the initial trouble using the copy and paste technique
from a
Word document, into Stephen's control: "You have to apply rich text
formatting codes to your text."

Yes -- you could take the rich text codes and plop them into a plain textbox
control bound to the same memo field, and that would work to have the
formatting displayed in the rich textbox. But if you plop them into the rich
textbox control, the control will just treat the codes as any other text.
 
N

Neil

Hmm, my first reply to you didn't seem to post (though OE shows it as having
been sent). Might have something to do with that it had a top.jpg graphic in
the post, apparently inadvertantly taken from the FMS web site. Anyway,
here's the post again, below. If two copies show up, then my apologies....


Tom Wickerath said:
Hi Neil,

I can't say that I have experienced the copy and paste glitch with the FMS
rich text control. You previous reply to George gave me a clue as to why I
might be having the initial trouble using the copy and paste technique
from a
Word document, into Stephen's control: "You have to apply rich text
formatting codes to your text."

If you add a plain text box control bound to the same memo field as
Stephen's rich text control, and then you press any key while the rich
text
control has focus, you can see the rich text formatting codes being
written
at that point.

A plain text box control bound to the same memo field should show you the
actual RTF codes at any point, whereas a rich textbox control should show
you the interpreted RTF codes (i.e., formatted text).
If you have a link to the comment on FMS's site, I'm interested in reading
it. To be honest, I haven't used this control in any production
applications--more just out of curiousity, since I have FMS's Total
Ultimate
Suite of tools.

It's in their FAQ: http://www.fmsinc.com/faqs/tamemo.htm#LoseCharacter . The
text is:

Why do I lose the first character when I start typing in the control?

Unfortunately, this is an Access bug that occurs when you first "dirty" a
new field. To work around this issue, set Me.Dirty = True when moving to a
new record.

I implemented the FMS rich text control in a database several years ago
for
a beautiful young woman I was dating, and whom I married about 5 years
ago.
Her birthname is Ye-Kyung, and she was born and raised in South Korea, so
English is her second language. This database was to help her learn common
American phrases, complete with the Korean translations. The database I
created, named "The Americanization of Ye.mdb" ("Ye" is a shortened form
of
her name) included the FMS control for a memo field named Example.
Unfortunately, the FMS control did not provide support for Unicode, so she
could not have rich text with her Korean translations. But, the database
was
a fun project that we enjoyed using (I guess I'm exposing my true
geekiness
here!). My family (Mom, Stepdad, sister & two brothers) contributed lots
of
phrases, a lot of which are not exactly "PC", but they're pretty funny
<smile>.

That's a very sweet story. Thanks for sharing. :)

Neil
 

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