Hi, i have written a query that takes one criteria string and searches every field returning any records containing that string. I would like to add a second criteria and return any records containing both criteria. Copy of existing query below, please help
SELECT TblQuotation.[Quotation Number], TblQuotation.[Raised By], TblQuotation.Customer, TblQuotation.Contact, TblQuotation.[Quotation Description], TblQuotation.Location, TblQuotation.Product, TblQuotation.[Quotation Result], TblQuotation.[Quotation Status], TblQuotation.Requote, TblQuotation.[quotation value]
FROM TblQuotation
WHERE (((TblQuotation.[Quotation Number]) Like "*" & Forms!FrmSearchAllRecords!Search_Text_Box & "*")) Or (((TblQuotation.[Raised By]) Like "*" & Forms!FrmSearchAllRecords!Search_Text_Box & "*")) Or (((TblQuotation.Customer) Like "*" & Forms!FrmSearchAllRecords!Search_Text_Box & "*")) Or (((TblQuotation.Contact) Like "*" & Forms!FrmSearchAllRecords!Search_Text_Box & "*")) Or (((TblQuotation.[Quotation Description]) Like "*" & Forms!FrmSearchAllRecords!Search_Text_Box & "*")) Or (((TblQuotation.Location) Like "*" & Forms!FrmSearchAllRecords!Search_Text_Box & "*")) Or (((TblQuotation.Product) Like "*" & Forms!FrmSearchAllRecords!Search_Text_Box & "*")) Or (((TblQuotation.[Quotation Result]) Like "*" & Forms!FrmSearchAllRecords!Search_Text_Box & "*")) Or (((TblQuotation.[Quotation Status]) Like "*" & Forms!FrmSearchAllRecords!Search_Text_Box & "*")) Or (((TblQuotation.Requote) Like "*" & Forms!FrmSearchAllRecords!Search_Text_Box & "*"));
SELECT TblQuotation.[Quotation Number], TblQuotation.[Raised By], TblQuotation.Customer, TblQuotation.Contact, TblQuotation.[Quotation Description], TblQuotation.Location, TblQuotation.Product, TblQuotation.[Quotation Result], TblQuotation.[Quotation Status], TblQuotation.Requote, TblQuotation.[quotation value]
FROM TblQuotation
WHERE (((TblQuotation.[Quotation Number]) Like "*" & Forms!FrmSearchAllRecords!Search_Text_Box & "*")) Or (((TblQuotation.[Raised By]) Like "*" & Forms!FrmSearchAllRecords!Search_Text_Box & "*")) Or (((TblQuotation.Customer) Like "*" & Forms!FrmSearchAllRecords!Search_Text_Box & "*")) Or (((TblQuotation.Contact) Like "*" & Forms!FrmSearchAllRecords!Search_Text_Box & "*")) Or (((TblQuotation.[Quotation Description]) Like "*" & Forms!FrmSearchAllRecords!Search_Text_Box & "*")) Or (((TblQuotation.Location) Like "*" & Forms!FrmSearchAllRecords!Search_Text_Box & "*")) Or (((TblQuotation.Product) Like "*" & Forms!FrmSearchAllRecords!Search_Text_Box & "*")) Or (((TblQuotation.[Quotation Result]) Like "*" & Forms!FrmSearchAllRecords!Search_Text_Box & "*")) Or (((TblQuotation.[Quotation Status]) Like "*" & Forms!FrmSearchAllRecords!Search_Text_Box & "*")) Or (((TblQuotation.Requote) Like "*" & Forms!FrmSearchAllRecords!Search_Text_Box & "*"));