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.
>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 othertable>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 billingship.>that has a column called BugNumber. 1-many relationto>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 mefield>date.
>Now, I want to display on the main form a calculatedfor>that shows me the total amount billed to date for a given
>bug number. It should be an easy matter to sum valuescreated>a given bug number from the billing table/form. I>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.