473,698 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Closing a report with a subform, when subform is having no data?

17 New Member
Hi to all,

After searching the net for a couple of hours I just have to ask the question. How can I close a report with a subform (Pivot Chart) when this Pivot Chart is having no data?

Explenation:
I have a report, which displays a Pivot Chart (Subform). When clicking a command button for displaying this report a form pop-up wil appear, where one can select a dynamic date range. In this pop-up form I included a Cancel button. When the cancel button is clicked I want the pop-up form to close (that isn't hard to realize) and I want the report to close as well. Otherwise I will always get the parameter value box to ask me for the date range.
I found out that in a normal report, not displaying a subform, you can use the No Data property. This works great. But when applying this to a report with a subform, nothing happens other than the report is being displayed with no results in the Chart.

Can anybody help me with this problem?
Thanks!

Rg.

Marco
Oct 28 '08 #1
1 1762
Crombam
17 New Member
Hi,

I can't stop thinking about this problem. I came up with the following.
Is it possible to create an If-Then Statement where I check the value of a field in the subform and if the value is 0 then it shoudl cancel the report?

Here the code:

Private Sub Report_Load()

If Me!ChtZiektever zuim_(incl%).Fo rm!Year.Value = "" Then Cancel = True

End Sub

It doesn't work because Access can't find the field "ChtZiekteverzu im_(incl%)". How do I refer to a field in the subform the proper way. Bear in mind that I'm now using trial and error. I simply want to check a field in the subform for a value and if so the report should be canceled or displayed.
Hope that anyone can help??

Rg.

Marco
Oct 29 '08 #2

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

Similar topics

2
3907
by: Del | last post by:
Thanks in advance for any help. I have a database that was created in Access 2000. Several users have been upgraded to Access 2003. Since upgrading to 2003 we have noticed that some of the calculated fields are not being populated. The database is a samll invoicing database on the form and report we have columns call Unit Cost. This is the actual cost of the part and is pulled from our parts master table and is displayed in a sub form...
2
2667
by: John Young | last post by:
I am creating a report / letter that automatically fills in fields from a form when a command button is pressed on the form..... The idea is to create a report /letter containing member address and specific vehicle details from data displayed on form... (member can have many vehicles and specific vehicle is selected from second tab section (subform ?)of form I have a form with two tab pages on it and data is required from both...
2
2557
by: Rick Caborn | last post by:
I am having a problem with an Access 2000 report getting data from SQL Server 2000. Here are the specifications for it: RecordSource: a stored procedure (tested via query analyzer and working correctly - permissions properly set) InputParameters: just one - provided by a function call that is functioning properly When I run the report, it hits the Load event, runs the function to get
5
2445
by: ChadDiesel | last post by:
My basic question is why does my print report button on my subform print a blank report when my cursor is on a blank entry line? Here is a more detailed explanation of my problem. I have a form that contains shipment destination information and a subform that contains boxes for that shipment. The main form is a table called Ship_Info, and the subform is a table called Label_Info. They both contain and are linked by a field called...
3
7390
by: lorirobn | last post by:
Hello, I have a report which uses a subreport. When I run the report, I get "Enter Parameter Value" error message for "tblGuestRoom". I click ok and the report seems to work fine. I narrowed down this error to the Link Master Fields property setting, when I tried the same scenario with form/subform. It gave me error: 'The Link Master fields property setting has produced this error: The object doesn't contain the Automation object...
4
8834
by: Macbane | last post by:
Hi, I have a 'main' form called frmIssues which has a subform control (named linkIssuesDrug) containing the subform sfrmLink_Issues_Drugs. A control button on the main form opens a pop-up form which allows me to edit the record in the subform. What I want to happen is for subform with the new edits to be updated on the main form when I close the popup. I'm sure this is a very small bit of code in the the 'On close' event for the popup...
3
7698
by: Darin | last post by:
I have a problem I just can't figure out. I have a form with a subform, and the recordsource of the subform has criteria based on some unbound fields in the parent form so that data in the parent form affects data in the subform. I've had this type of setup often, but I've run across a couple forms where this has caused an "enter parameter value" pop up for each reference to the parent control in the query when the main form is closed. ...
4
5881
by: Henrootje | last post by:
I have a REPORT with in it a subFORM Now I have this label (lblMonth) that I want to change. How should I do this? What would be the proper event to do this? The lblMonth should contain the name of the month as jan 07 Any ideas?
12
3532
by: Studiotyphoon | last post by:
Hi, I have report which I need to print 3 times, but would like to have the following headings Customer Copy - Print 1 Accounts Copy - Print 2 File Copy -Print 3 I created a macro to print the report three times, but do not know how
0
8600
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9155
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9018
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8858
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7711
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6517
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5859
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4614
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
1997
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.