+ Reply to Thread
Results 1 to 3 of 3

How can i Apply a filter to a combo box

  1. #1
    Registered User
    Join Date
    03-06-2009
    Location
    India
    MS-Off Ver
    MSoffice2007
    Posts
    43

    How can i Apply a filter to a combo box

    Hi Everyone.

    I have a combo box which navigates to a selected record. Works fine.

    What I would like to do is when I apply a filter to the main form the combo box is on, I would like to apply the same filter to the list of records displayed by the combo box.

    I have tried many different approaches, but its beyond me so I thought Id better ask the experts.

    Here is the usual after update code for the combo box:

    Please Login or Register  to view this content.
    Any help will be very much appreciated.

  2. #2
    J.wills
    Guest

    Re: How can i Apply a filter to a combo box

    I think all that you need to do is tell the combo to ReQuery. This assumes that the combo's source is based on the filtered form data.

    This would be in the code section that performs the filtering of the form.

    ' Clear the combo
    Me.Combo = Null

    ' If the combo RowSource (SQL) needs to change, do it here
    strSQL = ????
    Me.Combo.RowSource = strSQL

    ' Force a re-query
    Me.Combo.Requery

  3. #3
    J.wills
    Guest

    Re: How can i Apply a filter to a combo box

    I think all that you need to do is tell the combo to ReQuery. This assumes that the combo's source is based on the filtered form data.

    This would be in the code section that performs the filtering of the form.

    '
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1