Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / September 2007

Tip: Looking for answers? Try searching our database.

Make a label visible

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JL Wright - 11 Sep 2007 17:36 GMT
I have a control on a form.  The name of the control is STATUS.  
If the data in STATUS shows to be “Inactive” I would like a label to be
visible.  
The name of the label in question is lblInactive.  
I would like lblInactive to read “This is an inactive file.”  
Otherwise, I would like for the label named lblInactive to not be invisible.

Signature

Jerry Wright

fredg - 11 Sep 2007 17:39 GMT
> I have a control on a form.  The name of the control is STATUS.  
> If the data in STATUS shows to be “Inactive” I would like a label to be
> visible.  
> The name of the label in question is lblInactive.  
> I would like lblInactive to read “This is an inactive file.”  
> Otherwise, I would like for the label named lblInactive to not be invisible.

Set the label's Caption to
“This is an inactive file.”  
without the quotes.

Code the Status AfterUpdate event:
Me![lblInactive].Visible = Me![Status] = "Inactive"

Place the same code in the form's Current event.

Signature

Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

Chris Reveille - 11 Sep 2007 17:46 GMT
Assuming this is a single form.
In the On current event of the form put
If me.STATUS ="Inactive" then
me.lblInactive = "This is an inactive file."
me.lblInactive.visible = true
else
me.lblInactive.visible = false
end if
Signature

Chris

> I have a control on a form.  The name of the control is STATUS.  
> If the data in STATUS shows to be “Inactive” I would like a label to be
> visible.  
> The name of the label in question is lblInactive.  
> I would like lblInactive to read “This is an inactive file.”  
> Otherwise, I would like for the label named lblInactive to not be invisible.
JL Wright - 11 Sep 2007 18:22 GMT
Chris
I took out    
-- me.lblInactive = "This is an inactive file."
and it works just fine.

Thanks so much.
Jerry Wright

> Assuming this is a single form.
> In the On current event of the form put
[quoted text clipped - 11 lines]
> > I would like lblInactive to read “This is an inactive file.”  
> > Otherwise, I would like for the label named lblInactive to not be invisible.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.