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 on no data
I have a report that works great when there is some information from the
query that supplies the data. However, if there is no data available then the form produces the #Error message is various places. Is there a way to prevent this something on the lines of ISError? Am I close to the idea and if so where would be the best place to put the code? Many thanks for taking the time to ready this. Any and all help much appreciated. Debbie D. |
#2
|
|||
|
|||
Instead of taking care of the error, display a message that there is no data
to display, and close the report On the OnNoData Property of the report write the code MsgBox "No Data" Cancel = True -- I hope that helped Good luck "Debbie D." wrote: I have a report that works great when there is some information from the query that supplies the data. However, if there is no data available then the form produces the #Error message is various places. Is there a way to prevent this something on the lines of ISError? Am I close to the idea and if so where would be the best place to put the code? Many thanks for taking the time to ready this. Any and all help much appreciated. Debbie D. |
#3
|
|||
|
|||
Debbie D. wrote:
I have a report that works great when there is some information from the query that supplies the data. However, if there is no data available then the form produces the #Error message is various places. Is there a way to prevent this something on the lines of ISError? Am I close to the idea and if so where would be the best place to put the code? Many thanks for taking the time to ready this. Any and all help much appreciated. Presumably, the #Error is appearing in a text box that refers to a total text box's value in the subreport's header/footer section. If that's a valid deduction, then the main report text box's expression should be along these lines. =IIf(subreport.Report.HasData, subreport.Report.total, 0) -- Marsh MVP [MS Access] |
#4
|
|||
|
|||
Ofer,
Thanks, worked great! "Ofer" wrote: Instead of taking care of the error, display a message that there is no data to display, and close the report On the OnNoData Property of the report write the code MsgBox "No Data" Cancel = True -- I hope that helped Good luck "Debbie D." wrote: I have a report that works great when there is some information from the query that supplies the data. However, if there is no data available then the form produces the #Error message is various places. Is there a way to prevent this something on the lines of ISError? Am I close to the idea and if so where would be the best place to put the code? Many thanks for taking the time to ready this. Any and all help much appreciated. Debbie D. |
#5
|
|||
|
|||
Marshall,
Have now tried both of the inputs from this question that you kindly answered. Works great. Thanks!! "Marshall Barton" wrote: Debbie D. wrote: I have a report that works great when there is some information from the query that supplies the data. However, if there is no data available then the form produces the #Error message is various places. Is there a way to prevent this something on the lines of ISError? Am I close to the idea and if so where would be the best place to put the code? Many thanks for taking the time to ready this. Any and all help much appreciated. Presumably, the #Error is appearing in a text box that refers to a total text box's value in the subreport's header/footer section. If that's a valid deduction, then the main report text box's expression should be along these lines. =IIf(subreport.Report.HasData, subreport.Report.total, 0) -- Marsh MVP [MS Access] |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do I save an access document in word document? | cmartin | General Discussion | 2 | September 13th, 2005 11:26 PM |
Unable to have multiple queries feeding a single report | PZ Straube | Setting Up & Running Reports | 15 | June 15th, 2005 08:16 AM |
Data Source issues. ??data.access.pages | Phil | Database Design | 2 | October 11th, 2004 02:42 AM |
Data Source issues | Philippe | Database Design | 1 | October 10th, 2004 09:45 PM |
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 |