Alpha Video Training
Results 1 to 12 of 12

Thread: Data Input of fractions

  1. #1
    Member
    Real Name
    Kevin Gilroy
    Join Date
    Dec 2001
    Posts
    232

    Default 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. #2
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,311

    Default 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. #3
    Member
    Real Name
    Kevin Gilroy
    Join Date
    Dec 2001
    Posts
    232

    Default 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. #4
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,311

    Default 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

    Shouldn't be too bad, either.

    -- tom

  5. #5
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,299

    Default RE: Data Input of fractions

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

    open your form.
    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. #6
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,299

    Default 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. #7
    Member
    Real Name
    Kevin Gilroy
    Join Date
    Dec 2001
    Posts
    232

    Default RE: Data Input of fractions

    Selwyn & Tom,

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

    Grateful thanks,

    Kevin

  8. #8
    "Certified" Alphaholic
    Real Name
    jim chapman
    Join Date
    Apr 2000
    Posts
    1,779

    Default 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. #9
    "Certified" Alphaholic
    Real Name
    Russ Boehle
    Join Date
    Mar 2000
    Location
    Connecticut
    Posts
    2,767

    Default 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. #10
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,299

    Default RE: Data Input of fractions

    type alt 0188

  11. #11
    "Certified" Alphaholic
    Real Name
    William Hanigsberg
    Join Date
    Apr 2000
    Location
    Toronto, ON
    Posts
    4,018

    Default 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. #12
    Member
    Real Name
    Kevin Gilroy
    Join Date
    Dec 2001
    Posts
    232

    Default RE: Data Input of fractions

    Russ,

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

    Many thanks again

Similar Threads

  1. data input
    By dik_coleman in forum Alpha Five Version 5
    Replies: 6
    Last Post: 06-03-2004, 02:03 PM
  2. Input and display fractions in number field
    By Howard G. Cornett in forum Alpha Five Version 5
    Replies: 12
    Last Post: 04-15-2004, 04:22 AM
  3. Slow data input
    By Lowell Wardlow in forum Alpha Five Version 4
    Replies: 8
    Last Post: 07-31-2002, 03:09 PM
  4. Remote data input.
    By Jesse Vickey in forum Alpha Five Version 4
    Replies: 2
    Last Post: 07-12-2002, 11:09 AM
  5. verifying pre-form data input
    By rigore in forum Alpha Five Version 4
    Replies: 11
    Last Post: 06-03-2002, 01:16 PM

Bookmarks

Posting Permissions

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