If you intend to have the dropdown box have the various categories such as name, address, date and then a textbox that takes the actual search time all you need to do is include the selected item from the dropdown into the sql query along with the search term.
E.g. imagine I selected name in the list and entered a name as the search term in the textbox.
"SELECT [ROUTE], [INST_KEY], [INST_TYPE], [ACCT_KEY], [STATUS],
[DMZ], [CUST_NAME], [ADDRESS_LINE1], [ADDRESS_LINE3], [ADDRESS_LINE4], [ADDRESS_LINE5],
[METER_KEY], [SIZE], [INSTALL_DATE], [X], [Y], [Z], [ADDRESS_LINE2], [MI_PRINX] FROM [DBCUSTOMER]
WHERE (" + dropDownList.selectedItem.ToString() + " LIKE '%' + @CUST_NAME + '%')" Obviously the list can be added as a parameter as cust_name is.
hericles
Practically a Posting Shark
823 posts since Nov 2007
Reputation Points: 136
Solved Threads: 168