S
Simon
I have a form that is based on a query that i use to seach for
products that we sell
i have 3 text boxs that are the following
barcode
Product code
Product Name
i type text in either of the above it it requerys the form
Like "*" & [forms]![frmProductList]![ProductCodeSearch] & "*" Or Is
Null
Is there a way i can have one field on the form but it will seach the
barcode, prodcutcode and product code
Thanks
SELECT tblProduct.Barcode, tblProduct.ProductID,
tblProduct.ProductCode, tblProduct.PriceIncVAT,
tblProduct.ProductName, qryStock.StockLevel, tblProduct.StockedItem,
tblProduct.Discontinued
FROM tblProduct INNER JOIN qryStock ON tblProduct.ProductID =
qryStock.ProductID
GROUP BY tblProduct.Barcode, tblProduct.ProductID,
tblProduct.ProductCode, tblProduct.PriceIncVAT,
tblProduct.ProductName, qryStock.StockLevel, tblProduct.StockedItem,
tblProduct.Discontinued
HAVING (((tblProduct.Barcode) Like "*" & [forms]![frmProductList]!
[BarCodeSearch] & "*" Or (tblProduct.Barcode) Is Null) AND
((tblProduct.ProductCode) Like "*" & [forms]![frmProductList]!
[ProductCodeSearch] & "*" Or (tblProduct.ProductCode) Is Null) AND
((tblProduct.ProductName) Like "*" & [forms]![frmProductList]!
[txtProductSearch] & "*" Or (tblProduct.ProductName) Is Null) AND
((tblProduct.Discontinued)=[forms]![frmProductList]![Dis]));
products that we sell
i have 3 text boxs that are the following
barcode
Product code
Product Name
i type text in either of the above it it requerys the form
Like "*" & [forms]![frmProductList]![ProductCodeSearch] & "*" Or Is
Null
Is there a way i can have one field on the form but it will seach the
barcode, prodcutcode and product code
Thanks
SELECT tblProduct.Barcode, tblProduct.ProductID,
tblProduct.ProductCode, tblProduct.PriceIncVAT,
tblProduct.ProductName, qryStock.StockLevel, tblProduct.StockedItem,
tblProduct.Discontinued
FROM tblProduct INNER JOIN qryStock ON tblProduct.ProductID =
qryStock.ProductID
GROUP BY tblProduct.Barcode, tblProduct.ProductID,
tblProduct.ProductCode, tblProduct.PriceIncVAT,
tblProduct.ProductName, qryStock.StockLevel, tblProduct.StockedItem,
tblProduct.Discontinued
HAVING (((tblProduct.Barcode) Like "*" & [forms]![frmProductList]!
[BarCodeSearch] & "*" Or (tblProduct.Barcode) Is Null) AND
((tblProduct.ProductCode) Like "*" & [forms]![frmProductList]!
[ProductCodeSearch] & "*" Or (tblProduct.ProductCode) Is Null) AND
((tblProduct.ProductName) Like "*" & [forms]![frmProductList]!
[txtProductSearch] & "*" Or (tblProduct.ProductName) Is Null) AND
((tblProduct.Discontinued)=[forms]![frmProductList]![Dis]));