473,397 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

What to do with an empty query in a report?

I have a report that runs on a parameter query. I run the report, enter the
parameter, and it works as long as there is at least one record returned by
the query. But if it comes up empty, I get an error in the report. I think
there is some way to query the query to see if it's got any records and then
exit the report. How is this done?

Robert
Nov 12 '05 #1
2 2051
Robert wrote:
I have a report that runs on a parameter query. I run the report, enter the
parameter, and it works as long as there is at least one record returned by
the query. But if it comes up empty, I get an error in the report. I think
there is some way to query the query to see if it's got any records and then
exit the report. How is this done?

Robert


See if setting the event procedure for the Report's OnNoData event to
something will help. Ex:

Private Sub Report_NoData(Cancel As Integer)
msgbox "Nothing to report"
Cancel = True
End Sub

Nov 12 '05 #2

Perfect! Thanks.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Brian Coy | last post by:
I am creating a database to track scrap on a daily basis at my plant. I have to provide a weekly scrap report with the amount of each part scrapped per day. I have the basic database set up, and...
2
by: Robert | last post by:
I have a report that runs on a parameter query. I run the report, enter the parameter, and it works as long as there is at least one record returned by the query. But if it comes up empty, I get...
2
by: bobh | last post by:
Hi All, I have a report which has several sub-reports on it, Each sub-report has its own record source and child/parent link. Sometimes a sub-report may not have data for an entered policy nbr and...
3
by: grlgeek | last post by:
I have a report for creating the switchboard labels for our phone system receptionist switchboard. The template has 12 records per column. I setup a report that will create the labels and put a...
3
by: wgblackmon | last post by:
I'm currently running the following statement that is used in a Crystal Report. Basically, a record is returned when the T_PAYMENT.amount has a record in the database based on the value of the...
4
by: wattar | last post by:
Hi all, I will briefly tell you about the structure of my databse, and then will ask you my question. I have a database for project tracking, with a table for projects, and some other tables...
3
ADezii
by: ADezii | last post by:
Null as it relates to database development is one of life's little mysteries and a topic of total confusion for novices who venture out into the database world. A Null Value is not zero (0), a zero...
1
by: Stichtek | last post by:
Hi all, I'm new here and new to access and programing and pretty much everything I'm asking for help on. I hope you can help me out. I have an access database. I have a report that lists...
11
tuxalot
by: tuxalot | last post by:
The easy way is to put cancel = True in the On No Data event of the report. But why replicate code across all reports that way? My app selects reports from a listbox, so I would prefer to check the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.