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

Set visible objects when opening Report

I'd like to call a report from a form, using a Command button and I'd
like to make an unbound object, OLEBox, not visible in the report
footer.

I've tried:
DoCmd.OpenReport "TrackingRpt", acPreview, , ,OLEBox.visible=False
but get a compile error saying "Variable Not Defined"

Can this be done in the OpenArgs part of OpenReport?

Terry
Nov 12 '05 #1
4 4373
You can send an argument though OpenArgs, that the OnOpen event will read to
hide the control.

"Terry" <tc*****@merseymail.com> wrote in message
news:38*************************@posting.google.co m...
I'd like to call a report from a form, using a Command button and I'd
like to make an unbound object, OLEBox, not visible in the report
footer.

I've tried:
DoCmd.OpenReport "TrackingRpt", acPreview, , ,OLEBox.visible=False
but get a compile error saying "Variable Not Defined"

Can this be done in the OpenArgs part of OpenReport?

Terry

Nov 12 '05 #2
Terry,

Although you open the report, the code behind the button continues to run until
it gets to the End Sub line. So all you need to do is put the following code
after the OpenReport line:
Reports!TrackingRpt!OleBox.Visible = False

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"Terry" <tc*****@merseymail.com> wrote in message
news:38*************************@posting.google.co m...
I'd like to call a report from a form, using a Command button and I'd
like to make an unbound object, OLEBox, not visible in the report
footer.

I've tried:
DoCmd.OpenReport "TrackingRpt", acPreview, , ,OLEBox.visible=False
but get a compile error saying "Variable Not Defined"

Can this be done in the OpenArgs part of OpenReport?

Terry

Nov 12 '05 #3
Thanks Marleen,

Works like a dream:)

"Marleen" <mm*****@earthlink.net> wrote in message news:<VB*****************@newsread2.news.atl.earth link.net>...
Terry,

Although you open the report, the code behind the button continues to run until
it gets to the End Sub line. So all you need to do is put the following code
after the OpenReport line:
Reports!TrackingRpt!OleBox.Visible = False

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"Terry" <tc*****@merseymail.com> wrote in message
news:38*************************@posting.google.co m...
I'd like to call a report from a form, using a Command button and I'd
like to make an unbound object, OLEBox, not visible in the report
footer.

I've tried:
DoCmd.OpenReport "TrackingRpt", acPreview, , ,OLEBox.visible=False
but get a compile error saying "Variable Not Defined"

Can this be done in the OpenArgs part of OpenReport?

Terry

Nov 12 '05 #4
Ray
tc*****@merseymail.com (Terry) wrote in message news:<38*************************@posting.google.c om>...
I'd like to call a report from a form, using a Command button and I'd
like to make an unbound object, OLEBox, not visible in the report
footer.

I've tried:
DoCmd.OpenReport "TrackingRpt", acPreview, , ,OLEBox.visible=False
but get a compile error saying "Variable Not Defined"

Can this be done in the OpenArgs part of OpenReport?

Terry


Hello Terry,

I know that your question has been answered by another,
but why not just set the visible property for your object
to NO, then you don't need any code at all?

Regards,

Ray
Nov 12 '05 #5

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

Similar topics

2
by: Terry | last post by:
I'd like to call a report from a form, using a Command button and I'd like to make an unbound object, OLEBox, not visible in the report footer. I've tried: DoCmd.OpenReport "TrackingRpt",...
6
by: Roger | last post by:
I have a report with a image displaying our company logo if I create an snapshot of this report, it appears to create an 'snp' file, but nothing is stored in the folder I tried both linked and...
2
by: kaosyeti | last post by:
i can't get this working. in vba i tried to set visible to false in an if statement that looked like this: Private Sub GroupFooter1_Format(Cancel As Integer, FormatCount As Integer) If...
8
by: Hansen | last post by:
Hi I have a form with multiple labels and textboxes and listboxes that need to be made visible and not visible when buttons are clicked. Is there anyway of grouping them together so that I have...
2
by: Tom | last post by:
All: I had a DB that was routinely crashing when one report was opened. It happened in my final copy, archive copy and copies I received back from the client. However, it did not happen to the...
3
by: =?Utf-8?B?RnJlZHJpaw==?= | last post by:
Hi I have a problem in one of my user controls that I cannot find any solution for. I'am running C# for Visual studio 2003 and developing a windows application. The problem is the following: I...
12
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...
2
by: NJonge01 | last post by:
Hi, I have a report that should conditionally show some objects on the Report Header. These are the lowest objects in that section and they're not always necessary depending on where I'm opening...
11
by: Gord | last post by:
When I open a certain report, it runs some code that generates the records that will be displayed in that report. This works fine. When I go to print preview the report it appears that the code...
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: 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?
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
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
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...

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.