473,386 Members | 1,720 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.

Setting visible in a report? Or?

Ron
Hi,

I've got a report that has a subreport on it. On the subreport I've got a
label and control printing.

I'd like to have both the label and the control print only if it's not the
default for the control. The label/control is a lblDrLicNo/DrLicNo.
Default for control is "1111" (string).

I put the routine to make both label and control invisible if DrLicNo =
"1111" into the OnActivate in the subform and just running the subform, it
works fine. But as soon as I run the main form with the subform within it,
it prints the label and control regardless of what the control has in it.

How can I get done what I want?

TIA
ron
Jul 16 '06 #1
2 1305
"Ron" <ro*******************@earthlink.comwrote in
news:eM***************@newsread3.news.pas.earthlin k.net:
Hi,

I've got a report that has a subreport on it. On the
subreport I've got a label and control printing.

I'd like to have both the label and the control print only if
it's not the default for the control. The label/control is a
lblDrLicNo/DrLicNo. Default for control is "1111" (string).

I put the routine to make both label and control invisible if
DrLicNo = "1111" into the OnActivate in the subform and just
running the subform, it works fine. But as soon as I run the
main form with the subform within it, it prints the label and
control regardless of what the control has in it.

How can I get done what I want?

TIA
ron
First, read http://www.mvps.org/access/forms/frm0031.htm

Second, I think you might be better to use the OnFormat Event of
the subreport as the location for your code.

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Jul 16 '06 #2
Ron
"Bob Quintal" <rq******@sPAmpatico.cawrote in message
news:Xn**********************@66.150.105.47...
"Ron" <ro*******************@earthlink.comwrote in
news:eM***************@newsread3.news.pas.earthlin k.net:
>Hi,

I've got a report that has a subreport on it. On the
subreport I've got a label and control printing.

I'd like to have both the label and the control print only if
it's not the default for the control. The label/control is a
lblDrLicNo/DrLicNo. Default for control is "1111" (string).

I put the routine to make both label and control invisible if
DrLicNo = "1111" into the OnActivate in the subform and just
running the subform, it works fine. But as soon as I run the
main form with the subform within it, it prints the label and
control regardless of what the control has in it.

How can I get done what I want?

TIA
ron
First, read http://www.mvps.org/access/forms/frm0031.htm

Second, I think you might be better to use the OnFormat Event of
the subreport as the location for your code.

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com
This NG is fantastic!

Yup, the OnFormat Event did the trick. Thanks!

And thanks for the link to that chart too--I'll be using it regularly.

Hang in
ron
Jul 17 '06 #3

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

Similar topics

3
by: CSDunn | last post by:
Hello, I currently have an Access 2003 ADP Report/Subreport set up in which I have 12 subreports in a single main report that are located in a group header called 'PermnumHeader' (Permnum would be...
1
by: David | last post by:
Hi, I am trying to do something really simple, but am not quite sure how to. If I have 2 text boxes on a report and I wish to hide one dependent on what the other is showing. i.e, Text Box...
3
by: amywolfie | last post by:
Hi: I need to set the RecordSource of a single report to a different query each time the report is run. I'd like to do something in VBA like: If Me.PK_Rules = 1 Then DoCmd.OpenQuery...
1
by: ZRexRider | last post by:
Hi, I'm using MS Access 2003 and have developed a report that is called from a form that customizes a SQL statement to produce various results. DoCmd.OpenReport conReportName, acViewDesign ...
8
by: David Lozzi | last post by:
Howdy, I have a user control that is a report to display data. On the page the control is inserted in, I have filter options to filter the report. When I try to do something like this, nothing...
0
by: Madhu Subramanya | last post by:
I have a Crystal Report 10 report which i need to use in my app. I use Managed solution for this. There are no compiler or linker problems. I am not able to display this report on the screen but am...
9
by: Doug Glancy | last post by:
I got the following code from Francesco Balena's site, for disposing of Com objects: Sub SetNothing(Of T)(ByRef obj As T) ' Dispose of the object if possible If obj IsNot Nothing AndAlso...
4
by: Bill | last post by:
I have a command button that opens the a report. On the report the bulk of the information is in the sub report. I have a check box on the form that if isn't check will cause a field to be...
1
by: pdm | last post by:
hoi access, I have a subreport and with the id of inheritance of OOP I like to reuse this subreport in other main reports and hide some fields. First, is this possible and second what is the...
4
by: thecheyenne | last post by:
Hi there everybody; Fresh from reading my Access VBA for Dummies, I'd like to update my database about activities on a school outing. Here's what I'd like to achieve. The school outing costs...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.