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 / January 2005

Tip: Looking for answers? Try searching our database.

enable controls based on query results

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
finster26 - 31 Jan 2005 20:19 GMT
I have a form that queries by YEAR and a CODE. The YEAR is selected by ComboBox
and the CODE by a Check Box. I have 4 check boxes. Each with one of the
following values:

CS
CS/P
MO
OL

Once the YEAR is selected, I would like to disable any of the check boxes
that will not be in the results for that YEAR.

I used a subform with a query with "GROUP BY" that queries the YEAR for all
possible values entered. Say 2005. It  returns CS and CS/P. I would then like
to disable MO and OL check boxes. In other words, I will not find an entry of
MO or OL for any record in 2005 therefore only needthe option to check that
are CS OR CS/P.

How can I get this to work or is there a better way to this.

Thanks.
Stephanie N - 31 Jan 2005 22:45 GMT
I have never tried it with a check box but you can use a Combo Box and have
code for the Got Focus event like:

Me.Code.RowSource = "SELECT Code FROM TableName WHERE Year = '" &
Me.YearField & "'"

> I have a form that queries by YEAR and a CODE. The YEAR is selected by ComboBox
> and the CODE by a Check Box. I have 4 check boxes. Each with one of the
[quoted text clipped - 17 lines]
>
> Thanks.
 
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.