# Thread: Data Input of fractions

1. ## Data Input of fractions

The asci characters for the fractions
1/4,1/2 and 3/4 are
chr(188), chr(189), chr(190)

Is there any cheap and dirty way of entering
these special characters from the keyboard
into Alpha 5?

2. ## RE: Data Input of fractions

Kevin, I'll be watching this thread with interest.

In the meantime, maybe you can 'massage' the input value using the OnDepart event script for the field where these fractional values are being entered in decimal form. Why couldn't your script pick up the string from the text box, and then rewrite it using the ascii equivalents for the fractions themselves? In this fashion the script would essentially 'translate' the string from one form to another, and then refresh the field object.

-- tom

3. ## RE: Data Input of fractions

Thanks Tom,

That was what I thought might have to be done
but I was just hopeful I had missed a "hotkey"
somewhere!

I think I will mark the keyboards so that the
operators can hit the
] key for a 1/4
[ key for a 1/2 and
# key for a 3/4.

The script will then replace any occurence
of
] with chr(188)
[ with chr(189)
# with chr(190)

in the input data.

There, that was not so bad after all!

Still if anyone out there has been this
way before, do call..............

4. ## RE: Data Input of fractions

The script could also search for an occurence of

.25

and then substitute the code for 1/4

.50

and then substitute the code for 1/2

.75

and then substitute the code for 3/4

-- tom

5. ## RE: Data Input of fractions

i think that one really cool way to do this to use the speed typing glossary.

select tools/speed glossary.

enter .25 as the short form (in the 'replace' column) and =chr(188) as the long form.

then, when you type .25, a5's bubble help will offer the correct suggestion.

another technique is to create a custom toolbar. i will show you how to do that later.

6. ## RE: Data Input of fractions

here is an even cooler way to do this.

the attached sample shows how you can create a floating toolbar with buttons to insert the fractions.

you can copy this toolbar to your own databse by right clicking on it and selecting "copy to..."

7. ## RE: Data Input of fractions

Selwyn & Tom,

What can I say! The support provided on this
forum is beyond price!

Grateful thanks,

Kevin

8. ## RE: Data Input of fractions

Ok Selwyn,

I give up. How did you get the 1/4 text to show in the toolbar button text? The old alt-188 doesn't do it.

Thanks,
Jim

9. ## RE: Data Input of fractions

Not to belabor the point, but here are 2 more ways to do the same thing. (built on top of Selwyn's, sorry about that)

Russ

10. ## RE: Data Input of fractions

type alt 0188

11. ## RE: Data Input of fractions

What an amazing solution. It has made me realize that for a specific application one could produce a series of specialized mini toolbars much like the special toolbars Alpha provides in layout design mode. The special toolbars could be called from the form's regular menu or toolbar.

It opens ones eyes to new possibilities for sure.

Bill

12. ## RE: Data Input of fractions

Russ,

Brilliant!
I'm sure this will point the
way to many other possibilities.

Many thanks again

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•