Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2003
    Posts
    27

    Unanswered: Making list column equal combo box value

    i assume it should be something like ---
    cmbFrm1 - combo box name
    lstForm1 - list name
    i want first column in a list box to be limited to whats in a combo box


    Private Sub cmbFrm1_AfterUpdate()
    lstForm1.Column(0) = cmbFrm1.text
    End Sub

    still doesn't work though, any suggestions ?

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    I'm still a bit unclear (seems to be the norm today... *sigh*)

    What do you mean you want the list box to be limited to what's in the combo box? Do you mean that when you select a single value from the combobox, then that same value is selected in the listbox? Is the listbox merely filtered by the textbox selection? Or perhaps you mean you would like to populate the listbox with the entire contents of the combo box rowsource.

    What are you trying to do exactly?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Dec 2003
    Posts
    27
    Hi Teddy

    i mean this ---

    listbox merely filtered by the textbox selection

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Hmmm, that can still mean two different things...

    What is the listboxes relationship to the combo box?

    Is combobox like a list of categories, and the listbox needs to filter some choices for a category or what?

    If so, that's a classic "cascading listboxes" question. There's a ton of tutorials out there if you google, or search here for "cascading comboboxes" or "cascading listboxes"
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  5. #5
    Join Date
    Dec 2003
    Posts
    27
    i guess it can be classified as cascading list box situation

    my combo box selects distinct AppsID field in a table (right now there are only 1,2, and 4, but will be more, therefore i cannot use cases)

    No after user selects 1 from combo box, i want list (based on the same table)to only show records with AppsID 1

    Do i need to put select statement in RowSource ?

    right now i tried
    Private Sub cmbFrm1_AfterUpdate()
    lstForm1.Column(0) = cmbFrm1
    End Sub

    I cannod do case 1, case 2 because later more AppsCodes will be added

  6. #6
    Join Date
    Dec 2003
    Posts
    27
    got it, it was a lot simpler then i thought
    lstForm1.RowSource = "Select * From FormQuery Where AppsID =" & cmbFrm1.Text

Posting Permissions

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