Professional Web Applications Themes

Doing a calculation and displaying - Microsoft Access

Hello, I have a form that I have created to track information on trouble reports we turn into a vendor. I have created 2 other forms to act as subforms. On the main form i have created 2 command buttons that will open the other forms. when I create the buttons, i linked the forms together using a common data field that is in each form. So, the common field is BugNumber. I have a billing table that has a column called BugNumber. 1-many relation ship. I enter in a bugnumber, date billed, and billed amount as I get billing ...

  1. #1

    Default Doing a calculation and displaying

    Hello,

    I have a form that I have created to track information on
    trouble reports we turn into a vendor. I have created 2
    other forms to act as subforms. On the main form i have
    created 2 command buttons that will open the other forms.
    when I create the buttons, i linked the forms together
    using a common data field that is in each form.

    So, the common field is BugNumber. I have a billing table
    that has a column called BugNumber. 1-many relation ship.
    I enter in a bugnumber, date billed, and billed amount as
    I get billing statments from the vendor.

    So, on the main form i navigate to a form showing me
    BugNumber 4. I can then hit the Billing command button
    and a popup datasheet shows me the amounts billed to me to
    date.

    Now, I want to display on the main form a calculated field
    that shows me the total amount billed to date for a given
    bug number. It should be an easy matter to sum values for
    a given bug number from the billing table/form. I created
    my text box, and then modified the control source.

    Problem is that I can't get the proper format to get me
    any data. I keep getting #Name? or #Error.

    Help. Is there a better way? I don't want to constantly
    display the subforms and I don't want to do a ton of VBA.

    Thansk
    Bob
    bob Guest

  2. #2

    Default Doing a calculation and displaying

    Bob,

    You may have already tried this, but I think you may want
    to try the Dsum function with bug number as criterion.
    You may be trying to sum values for an object that is not
    open. Look at dsum...see if it helps.

    >-----Original Message-----
    >Hello,
    >
    >I have a form that I have created to track information on
    >trouble reports we turn into a vendor. I have created 2
    >other forms to act as subforms. On the main form i have
    >created 2 command buttons that will open the other
    forms.
    >when I create the buttons, i linked the forms together
    >using a common data field that is in each form.
    >
    >So, the common field is BugNumber. I have a billing
    table
    >that has a column called BugNumber. 1-many relation
    ship.
    >I enter in a bugnumber, date billed, and billed amount as
    >I get billing statments from the vendor.
    >
    >So, on the main form i navigate to a form showing me
    >BugNumber 4. I can then hit the Billing command button
    >and a popup datasheet shows me the amounts billed to me
    to
    >date.
    >
    >Now, I want to display on the main form a calculated
    field
    >that shows me the total amount billed to date for a given
    >bug number. It should be an easy matter to sum values
    for
    >a given bug number from the billing table/form. I
    created
    >my text box, and then modified the control source.
    >
    >Problem is that I can't get the proper format to get me
    >any data. I keep getting #Name? or #Error.
    >
    >Help. Is there a better way? I don't want to constantly
    >display the subforms and I don't want to do a ton of VBA.
    >
    >Thansk
    >Bob
    >.
    >
    Chris M. Guest

  3. #3

    Default Re: Doing a calculation and displaying

    WOHOOOOO!! Thanks..that did the trick!
    >-----Original Message-----
    >On Tue, 15 Jul 2003 06:28:48 -0700,
    <rstoreydcso.nashville.org>
    >wrote:
    >
    >>Here is the Expression i built.
    >>=DSum([Billing]![Billed Amount],[Billing],[Billing]![PCR]
    =
    >>[PCR])
    >
    >The arguments to DSum are *TEXT STRINGS*. You're passing
    the values of
    >controls.
    >
    >Try
    >
    >=DSum("[Billed Amount]", "[Billing]", "[PCR] = " & [PCR])
    >
    >If PCR is a field of Text type you need the syntactically
    required
    >quotemarks:
    >
    >=DSum("[Billed Amount]", "[Billing]", "[PCR] = '" & [PCR]
    & "'")
    >
    > John W. Vinson[MVP]
    > Come for live chats every Tuesday and Thursday
    >[url]http://go.compuserve.com/msdevapps?loc=us&access=public[/url]
    >.
    >
    Guest

Similar Threads

  1. Calculation
    By Kryss2099 in forum Macromedia Flash Data Integration
    Replies: 3
    Last Post: April 7th, 04:08 AM
  2. Calculation based on calculation
    By Point_Man@adobeforums.com in forum Adobe Acrobat Windows
    Replies: 0
    Last Post: April 20th, 03:35 AM
  3. Replies: 5
    Last Post: August 11th, 02:56 PM
  4. Calculation Field Help
    By Henry in forum FileMaker
    Replies: 2
    Last Post: August 4th, 10:48 PM
  5. Calculation Help
    By Heidi in forum Microsoft Access
    Replies: 1
    Last Post: July 17th, 09:34 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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139