Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2004
    Posts
    7

    Unanswered: Calculating in a form

    I have a subform that is set to "continuous form" mode. (It's for people to log in time spent on certain tasks in the workplace.)
    As a user selects an option from a list in a combo box, they then have to populate a text box with a number to represent the time spent on a particular task. They may add as many tasks as they want and the form expands accordingly.
    I want to add another text box that adds the time entered as the user populates the time. How can I show a running total in the form as the times are entered?


    ras

  2. #2
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004
    Quote Originally Posted by ras1
    I have a subform that is set to "continuous form" mode. (It's for people to log in time spent on certain tasks in the workplace.)
    As a user selects an option from a list in a combo box, they then have to populate a text box with a number to represent the time spent on a particular task. They may add as many tasks as they want and the form expands accordingly.
    I want to add another text box that adds the time entered as the user populates the time. How can I show a running total in the form as the times are entered?


    ras
    Hi ras1,
    Depending on your fields you can place a TextBox on the form to hold the calculated totals. For example, if you have these fields on your form:
    [Qty] and [UnitPrice] and you want the total of Qty * UnitPrice the TextBox will have this:
    ----------------------------------------
    =[Qty]*[UnitPrice]

    This would be placed on the line of the items
    ----------------------------------------
    If you want the running sum at the bottom of the form have a TextBox with this:
    ----------------------------------------
    =Sum([Qty]*[UnitPrice])

    This would give you the running totals. That's how I have my forms setup and it works. Hope this helps you out.

    Bud

  3. #3
    Join Date
    Apr 2004
    Posts
    7

    Question

    Thanks Bud, that's good info. But I'm not sure if that will work in my situation, since all I have is a field for "Hours". There's nothing to multiply it by. I just need to add up Hours. Seems like I need to do something like... =Sum([Hours]+ ????????) Not sure.

  4. #4
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004
    Quote Originally Posted by ras1
    Thanks Bud, that's good info. But I'm not sure if that will work in my situation, since all I have is a field for "Hours". There's nothing to multiply it by. I just need to add up Hours. Seems like I need to do something like... =Sum([Hours]+ ????????) Not sure.
    ras1
    That's about it. In a TextBox in the footer just do this:

    =Sum([Hours])

    There you go. Nothing to do (+) with.

    have a nice one,
    Bud

Posting Permissions

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