Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2004
    Posts
    3

    Unhappy Unanswered: Combo box and check boxes

    Hi,
    I'm new to access, but have written many add-ins with Excel with programming. I have a combo box(PropName) with many check boxes showing if that property has those services, which is linked to a table(PropertyInfo) How do I link the the check boxes to the combo box so that when the user selects a value in the combo box the check boxes change to appropriate values for that property name?? In Excel I did it through arrays, but I know access can do this much simpler/easier.

    Dave

  2. #2
    Join Date
    Nov 2003
    Posts
    1,487
    First of...set the RowSource for your combobox with a query that will allow you to contain the PropertName and all the Services associated with that PropertyName (use the query builder). Your PropertyName and services will then be contained within accessable columns of the ComboBox. Set the Columns Property for your CheckBox to the number of Services + 1 for the PropertyName.

    You can still use arrays if you like but for simplicity sake, I will sample off a more long winded method


    In the OnClick event of your ComboBox, inset code something like this:
    Code:
    'ProperyName should be in Me.myComboBoxName.Column(0)
    Me.my1stCheckBoxName.Value = Me.myComboBoxName.Column(1)
    Me.my2ndCheckBox.Value = Me.myComboBoxName.Column(2)
    Me.my3rdCheckBox.Value = Me.myComboBoxName.Column(3)
    'etc......
    'etc......

  3. #3
    Join Date
    Nov 2004
    Posts
    3
    Thank you. But now how do I only show the PropertyName value and not have a slider for the other columns.

  4. #4
    Join Date
    Nov 2003
    Posts
    1,487
    Set the Column Widths property for your ComboBox to this:

    1";0"

    or if you are in metric:

    3cm;0cm

    This property sets the visual width of each desired column. If you do not want a column visible, then give it zero (0).


  5. #5
    Join Date
    Nov 2004
    Posts
    3
    Thank You.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •