Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Frederick, Maryland, USA
    Posts
    296
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Calculated Table Field (2000)

    I have 3 fields in a particular table. I want to populate Field 3 with the value obtained by multiplying Fields 1 and 2 together. How do I do that? The calculation works in the overlying form, but the result of the calculation in the form does not populate the table. I tried using a query that multiplies Fields 1 and 2 together to populate Field 3, but that doesn't work. Please help. Thank you.

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

    Re: Calculated Table Field (2000)

    You don't usually store calculated information like this in a table since you can recreate it at need as you're doing on the form already. Storing calculated information involves constantly checking to see if any of the values have changed and then updating the calculated value. Your application usually has a lot of better things to do with its resources. <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15>
    Charlotte

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Edmonton, Alberta, Canada
    Posts
    326
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calculated Table Field (2000)

    I agree with Charlotte about not storing redundant information in your table. However, if you insist on doing that, you'll need to use an update query to do it for your existing records (check the builtin help for update queries). To do it for new records you'll need to use afterupdate event code for the fields for the two multipliers to update the result field.

Posting Permissions

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