Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP!!! Multi-Combobox search w/ query linked to form.

Status
Not open for further replies.

BigFizil

MIS
Mar 9, 2003
23
US
I have a query that is to search 9 different criteria from one table. I have a form that is set up to transfer the info from the combo box and send it to the query. I can either search by finding the product that fits all the criteria or no...criteria....I need to have the query ignore the untouched combo boxes...so ican search for a few criteria at a time....for example: just color and texture...not all 9 of the items in the query. I need to have that will ignore the combo boxes that are untouched....

here is my code.....PLEASE HELP!!!!!

SELECT Uttermost.*
FROM Uttermost
WHERE (((Uttermost.[Kinder Number])=[Forms]![ProductSearch]![cbokinnum])) OR (((Uttermost.[Product Type])=[Forms]![ProductSearch]![cbopt])) OR (((Uttermost.[Product Status])=[Forms]![ProductSearch]![cbops])) OR (((Uttermost.[Product Finish])=[Forms]![ProductSearch]![cbopf])) OR (((Uttermost.[Product Texture])=[Forms]![ProductSearch]![cbopt])) OR (((Uttermost.[Product Color])=[Forms]![ProductSearch]![cbopc])) OR (((Uttermost.[Product Material])=[Forms]![ProductSearch]![cbopm])) OR (((Uttermost.[Universal Category])=[Forms]![ProductSearch]![cbouc])) OR (((Uttermost.[Product Category])=[Forms]![ProductSearch]![cbopcat]))
ORDER BY Uttermost.[Kinder Number];
 
Hi there,

one solution would be set the default value of your combo boxes to '*', then when the query looks at the combo box it select all the records.

kind regards

Nowell Thompson
 
Just a '*' with the "'" around it?? or just a *? Also I was reading I have to write a lengthy SQL code with NULL statements in order to do this?? any Ideas I need to tackle this hurdle ASAP!
 
Won't that return every value...I simply want the boxes that dont need to be used or not needed for that particular search to be NULL or Ignored....So only the items that meet the specified criteria are returned.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top