Results 1 to 5 of 5

Thread: query help

  1. #1
    Join Date
    Jan 2003
    Posts
    2

    Unanswered: query help

    hi all...i'm a newbie in access so i need help about something simple.

    i want a listbox to be filled with all the values that are returned from a query.

    thanks in advance.

  2. #2
    Join Date
    Oct 2002
    Location
    Inland Northwest(US)
    Posts
    19

    Re: query help

    The list box wizard should pop up and give you that option.
    Laeskia

  3. #3
    Join Date
    Jan 2003
    Posts
    2
    thanks but i don't want the listbox to be filles with the query when i open the form.I want it to be filled after i run the query(which get the correct parametres after i fill in a combo box)..
    thanks anyway

  4. #4
    Join Date
    Nov 2002
    Posts
    9
    On the after update event of your combo box, set the RowSource of the Listbox to the query you are using to populate it

    eg...

    Private Sub MyCombo_AfterUpdate()

    If MyCombo & "" <> "" Then
    MyListBox.RowSource = "MyQuery"
    End If

    End Sub

  5. #5
    Join Date
    Dec 2002
    Location
    Columbus, GA
    Posts
    81
    How do you run your query, is there a button you click to run it? If so, you may be able to use an IF statement?

    Let me know and I will tell you the best way i know how. Something along the lines of if the query hasnt run, then say NO VALUES and if it has run, show the values you want.

    If your not into CODING, this would be your best solution, it just involves making a macro.

Posting Permissions

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