A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

calculated field doesn't show the correct data



 
 
Thread Tools Display Modes
  #1  
Old November 23rd, 2004, 06:05 PM
Alex
external usenet poster
 
Posts: n/a
Default calculated field doesn't show the correct data

I have 3 fields in a query and in a report: Aug, FAug, and AugP.
In the query AugP is being calculated as follows:
=IIf(nz([FAug])0,nz([Aug])/nz([FAug]),IIf(nz([Aug])0,1,0)).
So, if Aug 0 and FAug = 0 or Null it should be 1 (or 100%).
The query shows it correctly as 1. But, in the report it appears as 0 (0.00%).
Even when I copy this formula in the report AugP field it's 0 anyway.

Could anybody advise anything about how to fix it?

Thanks
  #2  
Old November 23rd, 2004, 06:11 PM
Alex
external usenet poster
 
Posts: n/a
Default

Some additional info:
When I change the format for the AugP to the General number it appears
correctly as 1 (in case of Aug0 and FAug =0).

"Alex" wrote:

I have 3 fields in a query and in a report: Aug, FAug, and AugP.
In the query AugP is being calculated as follows:
=IIf(nz([FAug])0,nz([Aug])/nz([FAug]),IIf(nz([Aug])0,1,0)).
So, if Aug 0 and FAug = 0 or Null it should be 1 (or 100%).
The query shows it correctly as 1. But, in the report it appears as 0 (0.00%).
Even when I copy this formula in the report AugP field it's 0 anyway.

Could anybody advise anything about how to fix it?

Thanks

  #3  
Old November 23rd, 2004, 06:14 PM
Rick B
external usenet poster
 
Posts: n/a
Default

I could be off here, but it does not look like you used the Nz function
properly. You do not tell it what to substitte for a null value...

nz([FAug],????)

???? should contain your substitute value.


Does is assume "0" if you leave out that argument?

Rick B



"Alex" wrote in message
...
Some additional info:
When I change the format for the AugP to the General number it appears
correctly as 1 (in case of Aug0 and FAug =0).

"Alex" wrote:

I have 3 fields in a query and in a report: Aug, FAug, and AugP.
In the query AugP is being calculated as follows:
=IIf(nz([FAug])0,nz([Aug])/nz([FAug]),IIf(nz([Aug])0,1,0)).
So, if Aug 0 and FAug = 0 or Null it should be 1 (or 100%).
The query shows it correctly as 1. But, in the report it appears as 0

(0.00%).
Even when I copy this formula in the report AugP field it's 0 anyway.

Could anybody advise anything about how to fix it?

Thanks



  #4  
Old November 23rd, 2004, 06:17 PM
Alex
external usenet poster
 
Posts: n/a
Default

Thanks everybody. It's done.
The miracle was that the textbox for this field was too small and the first
number didn't appear.

"Alex" wrote:

Some additional info:
When I change the format for the AugP to the General number it appears
correctly as 1 (in case of Aug0 and FAug =0).

"Alex" wrote:

I have 3 fields in a query and in a report: Aug, FAug, and AugP.
In the query AugP is being calculated as follows:
=IIf(nz([FAug])0,nz([Aug])/nz([FAug]),IIf(nz([Aug])0,1,0)).
So, if Aug 0 and FAug = 0 or Null it should be 1 (or 100%).
The query shows it correctly as 1. But, in the report it appears as 0 (0.00%).
Even when I copy this formula in the report AugP field it's 0 anyway.

Could anybody advise anything about how to fix it?

Thanks

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New Record Update Michelle Using Forms 5 October 28th, 2004 07:59 AM
How do I chart part of data but show all data in data table? CAngel Powerpoint 2 October 22nd, 2004 11:13 PM
Images in a database Franz General Discussion 10 October 7th, 2004 09:35 AM
How to create graphs in a monthly report where the base data can change John Clarke Charts and Charting 3 June 25th, 2004 02:22 AM


All times are GMT +1. The time now is 02:45 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.