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

Label Move Function on Report Print Event

I am working on a report and do not want a label to appear on certain conditions:

If Not Len(ExtendedInfo) > 0 Then
Me!Label34.Visible = False
Me!Label34.Top = 0
End If


The visible part works but to remove the white space I need to move it out of the way.

When this runs I get:

Run-time error '2101':
The setting you entered isn't valid for this property.


What is the proper way to do this
Jul 8 '14 #1

✓ answered by Seth Schrock

Try it in the Detail On Format event.

7 1592
Seth Schrock
2,965 Expert 2GB
Where do you have this code? On which line do you get your error?
Jul 8 '14 #2
It on a Section Event - On Print

The error is on the line: Me!Label34.Top = 0

Expand|Select|Wrap|Line Numbers
  1. If Not Len(ExtendedInfo) > 0 Then
  2. Me!Label34.Visible = False
  3. Me!Label34.Top = 0
  4. End If
Jul 8 '14 #3
Seth Schrock
2,965 Expert 2GB
Try it in the Detail On Format event.
Jul 8 '14 #4
On Format event works, it is moving the label but the section is not shrinking and it is configured with Can Shrink = Yes.

Is there a way to force to the Section to reset its height?
Jul 8 '14 #5
Seth Schrock
2,965 Expert 2GB
Are you sure that there isn't any other control that is stopping the section from shrinking?
Jul 8 '14 #6
twinnyfo
3,653 Expert Mod 2GB
Make the height of the control to 0, with the CanGrow set to true. It will look like a gray line on your report in design mode, but when it prints it will take up room when it needs it and will take up no room when it doesn't need it. This prevents you from needing any VBA behind that control.
Jul 8 '14 #7
I was able to force it to shrink down to the proper size.

Expand|Select|Wrap|Line Numbers
  1. Me.Detail.Height = 0
  2.  
Thank you Seth for the help
Jul 8 '14 #8

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

Similar topics

17
by: mp | last post by:
Hi. I know I can use "window.print()" to print a page, but is there a way to catch a print event when someone prints a document from the browser? Thanks. mp
0
by: Phuff | last post by:
I need to be able to capture events thrown by the Amyuni print driver( a 3rd parter pdf conversion product), and it has specified numbers which I believe I understand to be thw wParam of the print...
2
by: Roger | last post by:
I've got a table with one field (id) and one row (id = 1) I've got a query based on the table that calls a function select func(id) as idText from table The function 'func' is public...
5
by: Tom Louchbaum | last post by:
When I preview my Access 2000 Report it looks fine. When I Email the report using DoCmd.SendObject acSendReport, "Report", acFormatRTF, "To Address", , , "Subject", , False the resulting...
1
by: Richard Hollenbeck | last post by:
I noticed I can't push a value into a text box by saying something like, "txtThisTextBox = intSomeVariable * 0.5" because I get an run-time error saying I can't assign a value to this object....
4
by: VBTricks.de.vu Webmaster | last post by:
Hello everybody, I've been programming using VB6 for some years now and now I want to learn VB.net. One of the first things I'm missing most is the Move-function for controls. Is there no...
1
by: Thorben Grosser | last post by:
Hello newsgroup, I'm finally done with my folder-archiving tool, still there are some flaws. To label the folders, I use a Dymo LabelWriter 400 printer which works great for my purposes. ...
5
by: Desitech | last post by:
I have a Label on a report with a check box from a table indicating True or False. I would like to have the labels that are true to highlight yellow using conditional foramtting. The False labels to...
2
by: Rossouw | last post by:
Good day, I was wondering if there is a way to catch the print event of Microsoft Outlook, or some way to write macros to run an event before printing an email. The reason for this is, it seems...
4
by: calogero | last post by:
I am using MS Access 2010. I want to set a label on a report after opening it. I open the report with the following command, where sReport holds the report name: DoCmd.OpenReport sReport,...
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: 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:
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
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
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.