I am attempting to create a select all option in a combo box. I have created a union query with the following code:
SELECT "*" AS Task_Code, "(All)" AS Description, "(All)" AS Trade
FROM tbl_Taskcode
UNION SELECT tbl_Taskcode.Task_code, tbl_Taskcode.Description, tbl_Taskcode.Trade
FROM tbl_Taskcode
WHERE (((tbl_Taskcode.Trade)=[Forms]![frm_select_trade]![cboTrade]))
ORDER BY Task_code;
The combo box now has * as an option. However, when * is selected and the query that uses the combo box as a criteria is run, no results are returned. I tried using the LIKE operator and the following message appeared:
"ODBC--call failed."
Any ideas.
SELECT "*" AS Task_Code, "(All)" AS Description, "(All)" AS Trade
FROM tbl_Taskcode
UNION SELECT tbl_Taskcode.Task_code, tbl_Taskcode.Description, tbl_Taskcode.Trade
FROM tbl_Taskcode
WHERE (((tbl_Taskcode.Trade)=[Forms]![frm_select_trade]![cboTrade]))
ORDER BY Task_code;
The combo box now has * as an option. However, when * is selected and the query that uses the combo box as a criteria is run, no results are returned. I tried using the LIKE operator and the following message appeared:
"ODBC--call failed."
Any ideas.