PC Review


Reply
Thread Tools Rate Thread

control on form from report

 
 
John
Guest
Posts: n/a
 
      27th Sep 2010
I have a label on a main form. There is a print button on the main
form that opens the report. When the report opens I need for it to
check if a label is visible on the main form and if so display a label
on the report. Below is the what I have in the Report_Open event but
the report label is not showing.

If Forms![Purchase Orders].lblPONotApproved.Visible = True Then
Me.lblPOIsNotApproved.Visible = True
Else
Me.lblPOIsNotApproved.Visible = False
End If

Am I missing something or is there a better way to show the label?

Thanks....John
 
Reply With Quote
 
 
 
 
John
Guest
Posts: n/a
 
      27th Sep 2010
On Sep 27, 10:46*am, John <jevans10...@yahoo.com> wrote:
> I have a label on a main form. *There is a print button on the main
> form that opens the report. *When the report opens I need for it to
> check if a label is visible on the main form and if so display a label
> on the report. *Below is the what I have in the Report_Open event but
> the report label is not showing.
>
> * * If Forms![Purchase Orders].lblPONotApproved.Visible = True Then
> * * * * Me.lblPOIsNotApproved.Visible = True
> * * Else
> * * * * Me.lblPOIsNotApproved.Visible = False
> * * End If
>
> Am I missing something or is there a better way to show the label?
>
> Thanks....John




You can disregard this post. I figured it out. The code above is
fine. There was another piece in front of this that needed to be
modified.

Thanks for reviewing...John
 
Reply With Quote
 
John
Guest
Posts: n/a
 
      28th Sep 2010
On Sep 27, 1:30*pm, Marshall Barton <marshbar...@wowway.com> wrote:
> John wrote:
> >I have a label on a main form. *There is a print button on the main
> >form that opens the report. *When the report opens I need for it to
> >check if a label is visible on the main form and if so display a label
> >on the report. *Below is the what I have in the Report_Open event but
> >the report label is not showing.

>
> > * *If Forms![Purchase Orders].lblPONotApproved.Visible = True Then
> > * * * *Me.lblPOIsNotApproved.Visible = True
> > * *Else
> > * * * *Me.lblPOIsNotApproved.Visible = False
> > * *End If

>
> >Am I missing something or is there a better way to show the label?

>
> If it's not too cryptic for your tastes, you can shorten the
> code to just one line:
>
> * *Me.lblPOIsNotApproved.Visible = Forms![Purchase
> Orders].lblPONotApproved.Visible
>
> --
> Marsh
> MVP [MS Access]




Nothing is too cryptic. I like the one liner. Thanks.
.... John
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing a Form's control value to an unbount report's control =?Utf-8?B?SXNhYWM=?= Microsoft Access Forms 2 24th Jul 2006 08:41 AM
Form to control report mogens Microsoft Access Reports 3 21st Jan 2006 06:33 AM
How to control a report from a form? GZ Microsoft Access Form Coding 5 5th Aug 2004 10:53 PM
form & report control not update(?) Mary Microsoft Access Reports 2 2nd Aug 2004 08:50 PM
Accessing a report control from a form Vic Microsoft Access Getting Started 1 23rd Oct 2003 03:32 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:19 PM.