Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2010

    Unanswered: Adding a calculated text box value to a table field on a form

    Hi All

    Please could somebody advise me on how to add a calculated text box value to a field within a table. Basicly i have a form that records bookings and a text box thats sums the cost of each booking together giving me a sub total, which updates each time an extra booking row is added. I now want that value to be added to a field in my Invoice table.

    I am not sure on how to do this. Any help much appriciated


  2. #2
    Join Date
    Aug 2009
    Up Nort' Wi
    I'm not sure why you'd want to physically save a derived value (it's usually left for form controls and reports to do the calculating off hard values stored), but, I'd imagine something like that could be done by adding a TotalBooking feild to the table and when you add a record to the table:
    1)Have it look at the last previous record (Rec1) and get its TotalBooking value
    2)Then add the your record's (Rec2) CurrentBooking to Rec2's TotalBooking and store it in your record's TotalBooking field.

    So basically it'd look something like: Rec2.TotalBooking = Rec1.TotalBooking + Rec2.CurrentBooking

    Sam, hth
    Good, fast, cheap...Pick 2.

Posting Permissions

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