Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crosstab queries and reports

Status
Not open for further replies.

jgarnick

Programmer
Feb 16, 2000
189
US
I have a report that summarizes all the cash receipts for a month. This report is based on a crosstab query. the problem is, if a particular kind of receipt, ie application fee was not a receipt in a given month, then the report bombs out. This happens because I have a textbox whose control source is looking for the field in the crosstab query (which it won't be in the crosstab query because it is zero). I have tried using the Nz function without success. <br>
<br>
Does anyone know how to either have the crosstab include all possible types of receipts (some will have a zero balance) OR set the text box on the report to ignore the fact that the field may not be in the crosstab query?<br>
<br>
Below is an example of one of the text boxes on the report:<br>
=IIf(nz([App fee])&gt;0,[app fee],&quot;&quot;) <br>
<br>
Thanks! <p>jgarnick<br><a href=mailto:jgarnick@aol.com>jgarnick@aol.com</a><br><a href= > </a><br>
 
Try putting a 0 instead of a &quot;&quot;<br>
&quot;&quot; is a blank for a string. 0 of course is for a numeric which is what you are doing.<br>
<p> DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br>
 
Thanks DougP, I'm pretty sure I tried that and it didn't help--the problem with that though is I'd rather not have a bunch of 0's all over this report--it is several lines long!
 
Also, to add to above, using the "" instead of 0 works fine if all the possible types of receipts are processed in a month. The problem is when not all the types of receipts are in a month, the expressions on the report are looking for all of them. The error message is something like "Access does not recognize &lt;missing fieldname&gt; as a valid expression." So I don't believe using "" is the problem--<br>
<br>
I still need help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top