searching using combo box..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cassey14
    New Member
    • Dec 2006
    • 43

    searching using combo box..

    Hi everyone..

    I have a bit problem here..I am doing a search form..I created a combo box which they use to choose what they want to search..I want to filter all the result in a subform..But I dont know how...Can someone help me on this..Thank You in advance..


    -cassey
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32634

    #2
    Basically you have to :
    1. Create a subform based on a query (or table).
    2. Make the RecordSource to return all the possible records you may want.
    3. Create the ComboBox in your main form.
    4. Give it the contents of the list of items or whatever that you want them to select from.
    5. In the AfterUpdate event of the ComboBox create a Filter string for the SubForm.
    6. Put this string into the FilterBy property of the form on the SubForm (A subForm is an container object on your main form & not the form itself).
    7. Call a Requery of your SubForm's form.

    Comment

    Working...