I have a lisbox in a from that allows that displays a list of items from a table. The fields on display in the listbox are the actual item name (item) and a unique code given to each item (test_code.) Here is the query for the listbox:
SELECT CONCAT(
test_code, ' - ',
item), "item_id" FROM "odbc_dbase1"."items" "items" ORDER BY "item" ASC
I have thousands of items in the items table, so users must search in order to find what they are looking for. Since test code appears first in the query, it ends up being the search term. For example, if I type ‘8’, the listbox will bounce to the part of the list where there are test_codes that begin with ‘8’. This is great, however, if the user doesn’t know the test_code for the item they are looking for, I also want them to be able to search by ‘item’ (which is the item name) as well. If you were to start typing a letter, then nothing would appear in the list, as no test_codes start with letters and ‘item’ is being ignored here since they come second to test_code.
Is there I way I can search by both test_code or item? I want to listbox to pull up whatever is more similar to my search criteria, regardless of whether or not it is a test_code or item. Thank you.