By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,456 Members | 1,250 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,456 IT Pros & Developers. It's quick & easy.

Set visible objects when opening Report

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.