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  

#error whne printing a report with no data



 
 
Thread Tools Display Modes
  #1  
Old March 4th, 2005, 01:17 PM
Kathy
external usenet poster
 
Posts: n/a
Default #error whne printing a report with no data

I added a text box to the report header with a control source of:

=IIf([HasData]=0, "No Data To Print","")

The code worked great but now I get #error in the detail line for part
number and
report total. How can I fix the #error. I need the report to print for an
audit.

  #2  
Old March 4th, 2005, 02:09 PM
Allen Browne
external usenet poster
 
Posts: n/a
Default

Use the IIf() expression with the HasData property in each expression, e.g.:
=IIf([HasData], Sum([Amount]), Null)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Kathy" wrote in message
...
I added a text box to the report header with a control source of:

=IIf([HasData]=0, "No Data To Print","")

The code worked great but now I get #error in the detail line for part
number and
report total. How can I fix the #error. I need the report to print for
an
audit.



  #3  
Old March 4th, 2005, 05:49 PM
Kathy
external usenet poster
 
Posts: n/a
Default

I am new to MS Access, Can you please look at the code, I still can't get it
to work
=IIf([HasData], Sum([extended cost]), Null, No 41/81 Transactions for
specified date range")

I need a report to still print even though there is no data for audit
purposes.

"Allen Browne" wrote:

Use the IIf() expression with the HasData property in each expression, e.g.:
=IIf([HasData], Sum([Amount]), Null)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Kathy" wrote in message
...
I added a text box to the report header with a control source of:

=IIf([HasData]=0, "No Data To Print","")

The code worked great but now I get #error in the detail line for part
number and
report total. How can I fix the #error. I need the report to print for
an
audit.




  #4  
Old March 5th, 2005, 10:52 AM
Allen Browne
external usenet poster
 
Posts: n/a
Default

What is:
No 41/81 Transactions for specified date range"

IIf has brackets.
Inside the brackets are 3 things separated by commas.
The first is something to test - [HasData] in your case.
The 2nd is what the show if there is data, e.g. a calculation.
The 3rd is what to show if there is no data, typically Null.

The previous example illustrates those 3 things.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Kathy" wrote in message
...
I am new to MS Access, Can you please look at the code, I still can't get
it
to work
=IIf([HasData], Sum([extended cost]), Null, No 41/81 Transactions for
specified date range")

I need a report to still print even though there is no data for audit
purposes.

"Allen Browne" wrote:

Use the IIf() expression with the HasData property in each expression,
e.g.:
=IIf([HasData], Sum([Amount]), Null)


"Kathy" wrote in message
...
I added a text box to the report header with a control source of:

=IIf([HasData]=0, "No Data To Print","")

The code worked great but now I get #error in the detail line for part
number and
report total. How can I fix the #error. I need the report to print
for
an
audit.



 




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
Pulling data from 1 sheet to another Dave1155 Worksheet Functions 1 January 12th, 2005 05:55 PM
Data not being display in Access Report via an ODBC Connection David S General Discussion 0 November 4th, 2004 03:19 AM
How do I get 3 series in sync with the x-axis? zizbird Charts and Charting 10 October 25th, 2004 01:23 PM
Is this possible with Excel Chart? q582gmzhi Charts and Charting 1 September 8th, 2004 03:33 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 04:40 AM.


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