I have a form that contains 7 combo boxes and 3 list boxes. Each connect to a main table in my database and I have queries for each. For example the first combo box is for the year of the main table and it looks like this:
select year_table.yr from year_table inner join main on year_table.yr_id = main.yr_id group by year_table.yr;
So all the year information would be displayed in that combox box and the end-user has the option to select 1 or more. The end-user can do this for all the 10 items above. Then I created a run results button and when that button is selected by the end-user, I want whatever was placed in the 10 above items to search in the main table and display the results based on what they asked for.
Example:
combo boxes: year, month, name, address, city, state, zip
list boxes: item, item desc, quantity
The main table houses for example yr_id, mth_id, name_id, address_id, city_id, state_id, zip_id, item_id, item_q_id and these ids have a relationship with the corresponding tables.
So say an end-user selects 2013, jan, john doe, 1111 stage street, ny, ny, 10090, skirt, blue skirt with leather belt, 4
I want my button to beable to display what was selected. Or if they leave something blank. Say they just put in 2013, jan, john doe and nothing else and want to see a display of all that john doe selected. I am thinking I need a query but just not sure how to go about it.