Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Youngstown, Ohio, USA
    Posts
    705
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Calculate within field

    Is there a way to enter two (or more) numbers into one field, joined by operators, and have the computed value saved? I have gotten used to programs like Quicken where this is possible -- enter "2+2" in the amount field and a "4" is saved as the field's value. I am not interested in storing the values as separate records, just the final total. I've tried attaching a button to the input form to activate the calculator, but it doesn't work smoothly... unless there would be a way to have the "Enter" key on the calculator transfer the total back into the Access field.

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calculate within field

    Hi David,

    I don't know if this will help, but I've got a popup calculator that should work like you've described (with the Enter key). This sample database that I discovered somewhere (I forgot where I found it) has 3 popup items: Calendar, Calculator and Zoom box.

    You download it either from this http://communities.msn.com/MarkJ/files/Popups.zip

    HTH <img src=/S/thumbup.gif border=0 alt=thumbup width=15 height=15>

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Calculate within field

    Alternatively, you can put code in the afterupdate event of the control (not the field, but the control on the form) to evaluate the expressions entered and set the control value to the result of the expression. That way, you could enter your 2+2 and have the form automatically convert it to 4 without having to pop up anything.
    Charlotte

Posting Permissions

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