473,417 Members | 1,460 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,417 software developers and data experts.

Display new report when chosen one contains no data...

94
I have a complicated report with numerous parameters which will on occasion return no records.

What i want to do is have a new report display when this happens which includes the company logo etc. stating something like "The parameters you have entered have returned no data, please try again."

I don't want to achieve this using a message box or any pop ups at all, due to the way my users are accessing the reports it will have to be a report which gives them the message.

I currently have in the no data property...
Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenReport "BWRptNO_DATA", acViewPreview
which will open the new report but it does so behind the report with no data in.
Every time i try to insert a Close somewhere in the code....
Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenReport "BWRptNO_DATA", acViewPreview
  2. DoCmd.Close acReport, "BWrptAnalysisOfEnrolmentsByPostCode"
i get an error message saying "This action can't be carried out while processing a form or report event.

Can anyone help me?
Mar 10 '08 #1
1 1061
Lewe22
94
Fixed it.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Report_NoData(Cancel As Integer)
  2.     DoCmd.OpenReport "BWRptNO_DATA", acViewPrevie
  3.     DoCmd.CancelEvent
  4. End Sub
Mar 11 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: stewart | last post by:
I'm writing an app that requires a 3-level optionMenu display. Basically I'm showing the contents of a 3-dimensional matrix. You choose the first level in the first optionMenu, the 2nd level in...
1
by: Dalan | last post by:
I designed a dialog box with a combo to select individual vendors from a form and its related data for print ouput. Though the dialog box seems to work okay, I apparently do not have the filtering...
9
by: Dennis Ruppert | last post by:
Greetings This is rather ambitious: I have a split database that contains many different reports. I have a form that the end user launches the reports from. They select the report criteria...
1
by: Geir Baardsen | last post by:
Hi! To Darryll Kerkeslager: Sorry..Something seems to happen when trying to answer your comment. U did understand it right. Of course I'll have an underlying query with the same fields. ...
12
by: Wadim Grasza | last post by:
I want to store and display (on a form or a report) multiple pictures per record in an access database. The pictures are not stored within the database. They are stored as files and the database...
1
by: Beowulf | last post by:
I'm having some difficulty and I can't for the life of me figure out why. I have a main report, rptMain, that contains a report header (displays the AppTitle), 3 group headers (one is a header...
1
by: JK | last post by:
In my win form, I'm trying to display a Crystal report with the data in my dataset only but, if I follow the steps in this msdn page: ...
6
by: fieldja | last post by:
I have a form called OwnerForm. It contains a combo box called Owner. The combo box looks up names from a table called OwnerName. It contains fields called OwnerID and Owner. I also have a main...
7
by: GROG | last post by:
Hi all... i have a set of record to display in my data report.. and i would like to use the "Select count (*) fromm XXXX " statement to count number of record that i've chosen.. The problem is.....
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.