By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,377 Members | 1,672 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,377 IT Pros & Developers. It's quick & easy.

Calculating 2 fields in subform

P: 6
I'm trying to calculate 2 seperate fields in a subform

First one is TotalQuantity
I have =Sum([Quantity]) in the subform footer
I then show this total on the main form with =Windows.Form!TotalQuantity
The above works no problem

The Second one I calculate is TotalPrice
I have =nz(Sum(ExtPrice)) in the subform footer
I then show this total on the mian form with =Windows.Form!TotalPrice

This doesn't work, I get an error on the main form.

What also baffles me is once I add the calculations for the second field, the first one also gives me an error and no longer works. I've searched various resources for over an hour and can't figure it out. HELP me plpease =)
Feb 20 '08 #1
Share this Question
Share on Google+
6 Replies


P: 7
On the help page below, it appears that the syntax in your code may be incorrect for the Nz function. You shouldn't have a null value for an extended price. If the item has no cost, I would use 0.00 in that field and just use =sum([ExtPrice]).

http://msdn2.microsoft.com/en-us/library/aa172237.aspx
Feb 20 '08 #2

P: 6
I have tried that also. That doesn't work either. I am completely at a loss as to why this isn't working.
Feb 20 '08 #3

P: 7
Can you send me a copy of the database? << e-mail removed >>

I have tried that also. That doesn't work either. I am completely at a loss as to why this isn't working.
Feb 21 '08 #4

NeoPa
Expert Mod 15k+
P: 31,768
Sherry,

Please feel free to swap contact details via the PM system, but that is not allowed in the public forums. Sorry.
See the Help (Link at top right) section for fuller details.

-Admin.
Feb 21 '08 #5

P: 6
I woke up this morning with a fresh mind and figured it out.
Instead of having it sum the extprice, I had it calculate the sum of Price x quantity and it worked for some reason.
Feb 22 '08 #6

NeoPa
Expert Mod 15k+
P: 31,768
That's good. Thanks for updating the thread :)
Feb 22 '08 #7

Post your reply

Sign in to post your reply or Sign up for a free account.