filter a form help with reusable code

accesslearner

Registered User.
Local time
Today, 13:58
Joined
Nov 16, 2010
Messages
38
I need to create a one resuable code to be used filter various forms in my database.

I had selected all the searchable fields put it in a table and then search the forms using a query.

Could anyone help me with the direction of how to go about doing it. My idea is to be able to populate the table and then to use various select statements to filter my forms.

Field from table = data the user types

either a combo box or text box.

i have looked through cascading combo box, form by filter method i am so confused i dont know how to get things working. Any help in the right direction will be appreciated

thanks
 

Attachments

  • filter.GIF
    filter.GIF
    7 KB · Views: 96
I am posting my sample db with the form and control to make better sense of the requirement.

I would like create a dynamic search form with search values in a list .
select first name , city, country job title from tblcontacts based on conditions. The idea is to create a single filter code and populate the table based on the form requirements.

when the user clicks on company a combo box should be displayed with the second cascading combo box which selects the contacts in the company. i have the combo box working but how to apply it to the sub form.

I need to create serveral queries and based on user selection the associated query should trigger the search results. am i on the right track is this something i can do.
search city = san jose
search country = usa
search company name = cbocompany value

would appreciate some pointers as you can see i have cut and pasted codes and am not very good with VBA thus the struggle.
 

Attachments

Users who are viewing this thread

Back
Top Bottom