I have a query that uses a text box and a combo box from a form to filter the data. I'm using the query to export the data to an excel.
The query works when it is filtered by the text box but it does not work when I use the combo box.
The query works when it is filtered by the text box but it does not work when I use the combo box.
Code:
SELECT SearchAll_qry.ID, SearchAll_qry.[Alpha Designator], SearchAll_qry.ICP, SearchAll_qry.[Cage Code], SearchAll_qry.[PART NUMBER], SearchAll_qry.NSN,
SearchAll_qry.NIIN, SearchAll_qry.NOMENCLATURE, SearchAll_qry.FIG, SearchAll_qry.ITEM, SearchAll_qry.QTY, SearchAll_qry.FY14AMDFPRICE, SearchAll_qry.Unit,
SearchAll_qry.EXTCost, SearchAll_qry.[QTY TO ORDER (12 Vehicles)], SearchAll_qry.[TOTAL COST (12 Vehicles)], SearchAll_qry.[Source of Fig/Item Numbers], SearchAll_qry.
[Source of Part], SearchAll_qry.Tab
FROM SearchAll_qry
WHERE (((SearchAll_qry.[Alpha Designator]) Like "*" & [Forms]![SearchMulti_frm]![SrchText] & "*")) OR (((SearchAll_qry.ICP) Like "*" & [Forms]![SearchMulti_frm]![SrchText] & "*"))
OR (((SearchAll_qry.[Cage Code]) Like "*" & [Forms]![SearchMulti_frm]![SrchText] & "*")) OR (((SearchAll_qry.[PART NUMBER]) Like "*" & [Forms]![SearchMulti_frm]![SrchText] & "*"))
OR (((SearchAll_qry.NSN) Like "*" & [Forms]![SearchMulti_frm]![SrchText] & "*")) OR (((SearchAll_qry.NIIN) Like "*" & [Forms]![SearchMulti_frm]![SrchText] & "*"))
OR (((SearchAll_qry.NOMENCLATURE) Like "*" & [Forms]![SearchMulti_frm]![SrchText] & "*")) OR (((SearchAll_qry.FIG) Like "*" & [Forms]![SearchMulti_frm]![SrchText] & "*"))
OR (((SearchAll_qry.ITEM) Like "*" & [Forms]![SearchMulti_frm]![SrchText] & "*")) OR (((SearchAll_qry.QTY) Like "*" & [Forms]![SearchMulti_frm]![SrchText] & "*"))
OR (((SearchAll_qry.FY14AMDFPRICE) Like "*" & [Forms]![SearchMulti_frm]![SrchText] & "*")) OR (((SearchAll_qry.Unit) Like "*" & [Forms]![SearchMulti_frm]![SrchText] & "*"))
OR (((SearchAll_qry.EXTCost) Like "*" & [Forms]![SearchMulti_frm]![SrchText] & "*")) OR (((SearchAll_qry.[QTY TO ORDER (12 Vehicles)]) Like "*" & [Forms]![SearchMulti_frm]![SrchText] & "*"))
OR (((SearchAll_qry.[TOTAL COST (12 Vehicles)]) Like "*" & [Forms]![SearchMulti_frm]![SrchText] & "*"))
OR (((SearchAll_qry.[Source of Fig/Item Numbers]) Like "*" & [Forms]![SearchMulti_frm]![SrchText] & "*")) OR (((SearchAll_qry.[Source of Part]) Like "*" & [Forms]![SearchMulti_frm]![SrchText] & "*"))
OR (((SearchAll_qry.Tab) Like "*" & [Forms]![SearchMulti_frm]![SrchText] & "*")) OR (((SearchAll_qry.[Source of Fig/Item Numbers])=[Forms]![SearchMulti_frm]![CboSource]));