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 / New Users / September 2004

Tip: Looking for answers? Try searching our database.

Filtering combo Boxes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris - 20 Sep 2004 15:53 GMT
Hello group

My cboBox is Bound to a table with the values First Applicant and Second
Applicant, respectively.

I would like to have the default value of the cboBox set to First Applicant.

I would also like the cboBox to only display  "First Applicant" If a chkBox
is ticked.

Cheers
John Vinson - 21 Sep 2004 06:34 GMT
>Hello group
>
>My cboBox is Bound to a table with the values First Applicant and Second
>Applicant, respectively.
>
>I would like to have the default value of the cboBox set to First Applicant.

Your question has answered itself: set the Combo Box's Default
property to "First Applicant".

>I would also like the cboBox to only display  "First Applicant" If a chkBox
>is ticked.

And what do you want to see if the checkbox isn't checked? No combo at
all? If so, you need two lines of VBA code:

Edit the Form's Current event (using the Code Builder, after clicking
on the ... icon by the event property) to

Private Sub Form_Current()
Me!cboApplicant.Visible = Me!checkboxname
End Sub

where cboApplicant is the name of the combo box; then in the combo's
AfterUpdate event put the same line.

                 John W. Vinson[MVP]    
            Join the online Access Chats
       Tuesday 11am EDT - Thursday 3:30pm EDT
     http://community.compuserve.com/msdevapps
Chris - 21 Sep 2004 10:38 GMT
> >I would also like the cboBox to only display  "First Applicant" If a chkBox
> >is ticked.
>
> And what do you want to see if the checkbox isn't checked? No combo at
> all? If so, you need two lines of VBA code:

the checkbox represents whether it is a JOINT mortgage - hence the "First
Applicant" and "Second Applicant".  When it is a joint mortgage, the cboBox
should represent both "First Applicant" and "Second Applicant" and when it
is unticked should only represent "first Applicant"

So no there's nothing to do with invisible properties.

Cheers and sorry for not making this clearer
John Vinson - 21 Sep 2004 21:34 GMT
>> >I would also like the cboBox to only display  "First Applicant" If a
>chkBox
[quoted text clipped - 7 lines]
>should represent both "First Applicant" and "Second Applicant" and when it
>is unticked should only represent "first Applicant"

I'm sorry, this isn't making sense to me.

A combo box is a tool which allows you to select a single value from
its "Rowsource" - which might be a list of values, or a table or a
query; the selected value is stored in a table in the field specified
by the combo's Control Source property.

I don't know what you mean by the combobox "should represent both".

What is the Control Source of this combo? What's its RowSource? Is
this on a Form, or <yuck, PTOOIE!> a Lookup Field in a table?

                 John W. Vinson[MVP]    
            Join the online Access Chats
       Tuesday 11am EDT - Thursday 3:30pm EDT
     http://community.compuserve.com/msdevapps
 
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.