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 Programming / April 2005

Tip: Looking for answers? Try searching our database.

text field Visible based on a combo box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brook - 08 Apr 2005 20:37 GMT
I have a cboordertype that I use for my orders, what I want to do is that
when "Program" is selected from the cbo box, a field designname become
visible, else visibility = false.

Any ideas?

Thanks,

Bro;ok
Klatuu - 08 Apr 2005 21:07 GMT
I am assuming that "field" designname is a text box.
In the AfterUpdate event of cboordertype:
IF me.cboordertype = "Program" then
   me.designname.visible = true
END IF

You will also have to do me.designname.visible = false when you are done wit
the current record.  Where you put it depends on what else goes on in your
form.  It should be the last thing before you go to a new record, or the
first thing you do when you get a new record.

> I have a cboordertype that I use for my orders, what I want to do is that
> when "Program" is selected from the cbo box, a field designname become
[quoted text clipped - 5 lines]
>
> Bro;ok
Steve Schapel - 08 Apr 2005 22:52 GMT
Brook,

Put code like this on the After Update event of the combobox...
 Me.designname.Visible = Me.cboordertype = "Program"

Signature

Steve Schapel, Microsoft Access MVP

> I have a cboordertype that I use for my orders, what I want to do is that
> when "Program" is selected from the cbo box, a field designname become
[quoted text clipped - 5 lines]
>
> Bro;ok
Brook - 09 Apr 2005 00:55 GMT
Thanks for the replies,

  What would I set the initial value for the desginname text box for ?
Visible yes or no?

 Brook

> Brook,
>
[quoted text clipped - 10 lines]
> >
> > Bro;ok
Steve Schapel - 09 Apr 2005 03:34 GMT
Brook,

Not sure.  Not visible initially probably.  In a sense it doesn't
matter.  Give it a try and see which suits your purpose best.

Signature

Steve Schapel, Microsoft Access MVP

> Thanks for the replies,
>
>    What would I set the initial value for the desginname text box for ?
> Visible yes or no?
>
>   Brook
 
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.