# Thread: Subform Total (MS Office XP)

1. ## Subform Total (MS Office XP)

I have a field on a subform =Nz([UnitListPrice])*Nz([Qty]). When I try to add a field in the footer for =Sum(ExtendedPrice) it produces #Error. If I try it on another field such as the qty field which isnt created using a formula the sum works. Any help would be greatly appreciated. I have worked on this for a couple hours and can not seem to get it. Thanks.

2. ## Re: Subform Total (MS Office XP)

Welcome to Woody's Lounge.
You could use :
=Sum(Nz([UnitListPrice])*Nz([Qty]))

3. ## Re: Subform Total (MS Office XP)

I have tried that too, same #Error. Thanks though

4. ## Re: Subform Total (MS Office XP)

Are you sure about your field names ?
This is working for me in Access 2000

5. ## Re: Subform Total (MS Office XP)

Does it work if you use the following?

=Nz([UnitListPrice],0)*Nz([Qty],0)

6. ## Re: Subform Total (MS Office XP)

That will only give me info for the first record. It doesnt work as soon as I add the Sum() to it.

7. ## Re: Subform Total (MS Office XP)

The field names are correct. I have checked them multiple times. I suspect it may be something to do with another formula I am using to get the UnitListPrice which is =combo6.column(2)

8. ## Re: Subform Total (MS Office XP)

and if you use :
=Sum(Nz(combo6.column(2))*Nz([Qty]))

9. ## Re: Subform Total (MS Office XP)

I don't think we'll be able to solve this without seeing the database. See <post#=401925>post 401925</post#> for instructions on how to post a stripped down copy of the database.

10. ## Re: Subform Total (MS Office XP)

That too produces #Error

11. ## Re: Subform Total (MS Office XP)

I have attached the stripped down version. Let me know if it doesnt work. Thanks

12. ## Re: Subform Total (MS Office XP)

You can create a query based on OrderAndParts_tbl and Parts_tbl, to add the Item Name and Unit List Price to records from OrderAndParts_tbl. You can also compute the Extended Price in this query. Use the query as record source of the subform; that way the UnitListPrice and ExtendedPrice controls don't need to be calculated. See attached version.

13. ## Re: Subform Total (MS Office XP)

I am not sure why I didnt try that to begin with. I got so hung up using the column reference and trying to figure that out I didnt even think about doing it any other way. Thanks alot

#### Posting Permissions

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