I'm trying to add "*" to a combo box and then pass it to a query. to select all records. I've used faq702-4538 as best I can but cannot get it to query without error.
Here is the SQL for the Combo Box (This works as it adds the "*" to the combo box)
SELECT qryComponentNumber.ComponentNumber FROM qryComponentNumber UNION SELECT "*" FROM qryComponentNumber
ORDER BY qryComponentNumber.ComponentNumber;
Here is the SQL for the query
"SELECT tblMFGItems.ComponentNumber, tblMFGItems.ManufactureName, tblMFGItems.ManufactureNumber, tblMFGItems.Status, tblMFGItems.RoHS, tblMFGItems.Preferred
FROM tblMFGItems
WHERE (((tblMFGItems.ComponentNumber)=[Forms]![frmCboLookup]![Combo0])) OR ((([Forms]![frmCboLookup]![Combo0])="*"));"
The query throws and error " Data type mismatch in the criteria expression"
Thanks for any help
--Dave
Here is the SQL for the Combo Box (This works as it adds the "*" to the combo box)
SELECT qryComponentNumber.ComponentNumber FROM qryComponentNumber UNION SELECT "*" FROM qryComponentNumber
ORDER BY qryComponentNumber.ComponentNumber;
Here is the SQL for the query
"SELECT tblMFGItems.ComponentNumber, tblMFGItems.ManufactureName, tblMFGItems.ManufactureNumber, tblMFGItems.Status, tblMFGItems.RoHS, tblMFGItems.Preferred
FROM tblMFGItems
WHERE (((tblMFGItems.ComponentNumber)=[Forms]![frmCboLookup]![Combo0])) OR ((([Forms]![frmCboLookup]![Combo0])="*"));"
The query throws and error " Data type mismatch in the criteria expression"
Thanks for any help
--Dave