By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,455 Members | 2,256 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,455 IT Pros & Developers. It's quick & easy.

searching using combo box..

P: 43
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
Jan 13 '07 #1
Share this Question
Share on Google+
1 Reply


NeoPa
Expert Mod 15k+
P: 31,186
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.
Jan 13 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.