Results 1 to 3 of 3
  1. #1
    UTLee is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    73

    Combo Box Filter from List Box Results

    Need help creating a combo box that filters a list box that I have created below the combo box. I have named the combo box "ComboAllOK". In the list box, I have essentially created a query in the row source in the properties that pulls information from several tables. Also in this query, I have created a field called AllOK using the builder feature:

    AllOK: IIf([tblMonthlyReview].[CashReview]='OK' And [tblMonthlyReview].[EquityDriftReview]='OK' And [tblMonthlyReview].[DomesticExposureReview]='OK' And [tblMonthlyReview].[AssetClassDriftReview]='OK','ALL OK','REVIEW')



    As you can see, this returns two results: ALL OK or REVIEW. This works exactly as I'd like it to in the List Box. The problem now is using the combo box to filter the list. I want to be able to filter the list to show all of the results (both ALL OK and REVIEW), filter to show only the ALL OK results, and filter to show only the REVIEW results. I've done this before using fields from a Table, but never from the query built withing the row source of the list box.

    Any suggestions?

    Thanks!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    make a table, tQrys2Flt,
    in it put the CAPTION , QRY
    the combo box will use this table and show the caption, with hidden qry field; columnwidths=2;0
    the bound col = 2

    when user picks the item in the combo,
    reset the listbox to the query given

    Code:
    sub cboBox_afterupdate()
      lstBox.RowSource = cboBox
    end sub

  3. #3
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    One way is to change the list box row source using the combo box.
    Attached Files Attached Files

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Filter Former Employees out of Combo Box List
    By millerprm in forum Access
    Replies: 3
    Last Post: 10-29-2014, 10:28 AM
  2. Replies: 13
    Last Post: 11-17-2013, 03:33 PM
  3. Replies: 1
    Last Post: 08-16-2012, 01:51 PM
  4. Filter List box from combo box selection
    By thart21 in forum Forms
    Replies: 3
    Last Post: 11-09-2011, 12:00 PM
  5. Replies: 1
    Last Post: 11-23-2010, 01:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums