Null in answer.

H

Herman_KLF

Hi All

I am almost sure you wil be able to help me rather quick.

I set up a report with two subreports counting stock. The 2 subforms
(PurchasesSub and SalesSub) are only a field each having the total of items
bought and the total of items sold. On the parent form (Stock) I created a
field to determine the difference between the 2. Everything went well, until
i found that if i have a product which i bought that had no sales yet, i.o.w
the sales figure is NULL the last figure gives me an #Error.

The code that I initially used was
=[Purchases1].[Report]![Sum Of Quantity]-[Sales].[Report]![Sum Of Quantity]

After reading the forum for answers l tried
=[Purchases1].[Report]![Sum Of Quantity]-Nz([Sales].[Report]![Sum Of
Quantity],0)

No Luck! The same is happening.


Thank you so long.

Herman
 
H

Herman_KLF

WOW! Merlin-stuff!

Thanks Arvin

Arvin Meyer MVP said:
Quick indeed:

http://www.mvps.org/access/reports/rpt0007.htm
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


Herman_KLF said:
Hi All

I am almost sure you wil be able to help me rather quick.

I set up a report with two subreports counting stock. The 2 subforms
(PurchasesSub and SalesSub) are only a field each having the total of
items
bought and the total of items sold. On the parent form (Stock) I created a
field to determine the difference between the 2. Everything went well,
until
i found that if i have a product which i bought that had no sales yet,
i.o.w
the sales figure is NULL the last figure gives me an #Error.

The code that I initially used was
=[Purchases1].[Report]![Sum Of Quantity]-[Sales].[Report]![Sum Of
Quantity]

After reading the forum for answers l tried
=[Purchases1].[Report]![Sum Of Quantity]-Nz([Sales].[Report]![Sum Of
Quantity],0)

No Luck! The same is happening.


Thank you so long.

Herman
 
S

Sylvain Lafontaine

On some system, you have to use the semicolon ";" instead of the comma ","
to separate the values of a list expression:

=[Purchases1].[Report]![Sum Of Quantity]-Nz([Sales].[Report]![Sum Of
Quantity];0)

You'll find this option in the regional settings of Windows. The same
option apply to the IIF() function.

--
Sylvain Lafontaine, ing.
MVP - Windows Live Platform
Email: sylvain2009 sylvainlafontaine com (fill the blanks, no spam please)
Independent consultant and remote programming for Access and SQL-Server
(French)
 
L

Larry Linson

Herman_KLF said:
WOW! Merlin-stuff!

Yes, we've heard Arvin has been seen wearing a black robe and tall hat with
mystical symbols.



__________ Information from ESET Smart Security, version of virus signature database 4054 (20090505) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 
A

Arvin Meyer MVP

Larry Linson said:
Yes, we've heard Arvin has been seen wearing a black robe and tall hat
with mystical symbols.

Actually, it was a purple robe. <g>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top