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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
#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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |