[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

MS Access Report NO Data

Posted on 2012-09-18
3
Medium Priority
?
422 Views
Last Modified: 2012-09-18
Been a while since I was in MS Access.

Theres a report that runs fine unless there is no data

Then all the fields show the #Error message

How do I get this to show as blanks or not at all?
0
Comment
Question by:lrbrister
3 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 2000 total points
ID: 38410222
Try this in the report's Open Event:


If Me.HasData = False then
    Msgbox "There is no data to report"
    Cancel = true
End if

Open in new window



And add error handling in the code that opens the report:
On Error Resume Next
Docmd.OpenReport "YourReportName", acViewPreview

Open in new window

0
 
LVL 58
ID: 38410236
Or use the reports NoData event and cancel the report opening with:

 Cancel = True

Jim.
0
 

Author Closing Comment

by:lrbrister
ID: 38410311
Perfect.  Thanks.

Like I said, been a while, as I've been .Net and SQL Server the past 10 years
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Quickbooks hosting can do wonders to your enterprise but considering the points elaborated in the article which will help you to better analyze the outcomes. So scan your business, its needs and then move to the new world of limitless benefits.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question