Filtering combo Boxes

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

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
 
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
 
I would also like the cboBox to only display "First Applicant" If a
chkBox
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
 
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"

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
 
Back
Top