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

Invalid reference for subreport in Parent OnFormat Event

I'd like to perform some conditional formatting in the OnFormat Event of my
Parent Report. This works fine, until my subreports are blank, then the
invalid references start happening. I understand why, but can't figure out
how to trap/prevent these. I tried using the hasdata property, but this also
gives me an invalid reference. Arrrrrgh.

Nov 13 '05 #1
1 2546
Jordan,

First, don't use OnFormat, use OnPrint. There are lots of sources
that will explain why.

Second, (maybe first in importance) check the order of events for
reports in the help file.

Also, I would investigate these:
* put each subreport in its own section
* set the section.visible = false if the subreport is blank
* check the section.visible property and don't fire the code for
that section if it is not visible
* make sure you are not referencing *anything* which could refer to
a subreport that isn't there outside the scope of the subreport

HTH,
Elaine
On Sun, 20 Mar 2005 22:38:22 -0500, "Jordan Fee" <W_*****@hotmail.com>
wrote:
I'd like to perform some conditional formatting in the OnFormat Event of my
Parent Report. This works fine, until my subreports are blank, then the
invalid references start happening. I understand why, but can't figure out
how to trap/prevent these. I tried using the hasdata property, but this also
gives me an invalid reference. Arrrrrgh.


Nov 13 '05 #2

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

Similar topics

2
by: Arnold | last post by:
Hey there, I just put the following code: DoCmd.GoToRecord , , acLast in the On Open event of my form, which has 2 subforms. The following error message appears when the form now opens: ...
0
by: John Hunter | last post by:
I've recently had a nasty problem with the "Invalid reference to the property Form" error in subforms - nasty because it doesn't seem to consistently happen to all forms which contain the same...
1
by: L.M. via AccessMonster.com | last post by:
I am using MS Access 2000. I have created a table of contents for a report, and I am updating the pages in the OnFormat Event (I don't want to do it on the OnPrint because they may be viewing it...
1
by: Nigel C | last post by:
Hi, I am going round in circles... I am trying to produce a report based upon the information gathered into a temp table. Each column (stored as a text field) in the table holds weekly...
16
by: John | last post by:
Hi I have posted this question several times but have received no reply. I have a main form which contains a panel which in turn contains a child form, like this; MainForm->MyPanel->ChildForm....
9
by: Gernot Frisch | last post by:
Is there any way to get a reference of parent class in default c'tor? Like this: class foo { class bar { foo& m_f; public:
6
by: Dave | last post by:
This is the first time I'm trying this in an ADP. I'm using Access 2003 and trying to change the Apptitle Property using the below: With Application.CurrentProject .Properties("AppTitle").Value...
6
by: jan.schaak | last post by:
hi, this is my sql code. -----start code----- SELECT Reeksen.ReeksNR, Reeksen.ReeksText, Count(Strips.Titel) AS NBTitel, (SELECT Count(strips.Titel) AS AantalVanTitel FROM (Reeksen INNER...
4
mdi
by: siddhanta | last post by:
i wanna create a mdi form. but to make the other form as child of the main i cant find any mdiparent property in the properties list. i m using vs 2010. help plzzz leave it i understood how...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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...

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.