Wes
2013-12-16 19:14:36 UTC
Hello,
I have a form that I can input information in several different text boxes, WorkOrder, PurchaseOrder, etc. When I click a search button, it runs a macro that looks at the form and if a box is not empty, it runs that filter. on the output.
I am trying to create one filter that will put the text from the text box in the appropriate column of the filter if the text box has data, but if not it will give ALL records. I thought you could use a "*", but can't seem to get it to work.
Can anyone help?
Here is an example of one of the filters' code. I am trying to combine all the filters into one single filter to clean up the database.
Thank you for the help.
SELECT PO_tbl_MasterWorkOrder.PurchaseOrder, PO_tbl_MasterWorkOrder.CustomerPO, PO_tbl_MasterWorkOrder.Customer, PO_tbl_MasterWorkOrder.Factory, PO_tbl_MasterWorkOrder.Status, PO_tbl_MasterWorkOrder.CPOFactoryConfirmedXF, PO_tbl_MasterWorkOrder.CPODateFactoryConfirmed, PO_tbl_MasterWorkOrder.CPODateXFConfirmedtoCustomer, PO_tbl_MasterWorkOrder.RevisedXFDate, PO_tbl_MasterWorkOrder.RevisionComment, PO_tbl_MasterWorkOrder.BarcodesReceived, PO_tbl_MasterWorkOrder.BarcodesSentToRO, PO_tbl_MasterWorkOrder.ScansReceived, PO_tbl_MasterWorkOrder.ScansApproved, PO_tbl_MasterWorkOrder.ScansApprovalToRO, PO_tbl_MasterWorkOrder.BarcodesComment, PO_tbl_MasterWorkOrder.ID
FROM PO_tbl_MasterWorkOrder
WHERE (((PO_tbl_MasterWorkOrder.CustomerPO)=[forms]![frmPO_WorkOrderMain]![Cust_POSearch]));
I have a form that I can input information in several different text boxes, WorkOrder, PurchaseOrder, etc. When I click a search button, it runs a macro that looks at the form and if a box is not empty, it runs that filter. on the output.
I am trying to create one filter that will put the text from the text box in the appropriate column of the filter if the text box has data, but if not it will give ALL records. I thought you could use a "*", but can't seem to get it to work.
Can anyone help?
Here is an example of one of the filters' code. I am trying to combine all the filters into one single filter to clean up the database.
Thank you for the help.
SELECT PO_tbl_MasterWorkOrder.PurchaseOrder, PO_tbl_MasterWorkOrder.CustomerPO, PO_tbl_MasterWorkOrder.Customer, PO_tbl_MasterWorkOrder.Factory, PO_tbl_MasterWorkOrder.Status, PO_tbl_MasterWorkOrder.CPOFactoryConfirmedXF, PO_tbl_MasterWorkOrder.CPODateFactoryConfirmed, PO_tbl_MasterWorkOrder.CPODateXFConfirmedtoCustomer, PO_tbl_MasterWorkOrder.RevisedXFDate, PO_tbl_MasterWorkOrder.RevisionComment, PO_tbl_MasterWorkOrder.BarcodesReceived, PO_tbl_MasterWorkOrder.BarcodesSentToRO, PO_tbl_MasterWorkOrder.ScansReceived, PO_tbl_MasterWorkOrder.ScansApproved, PO_tbl_MasterWorkOrder.ScansApprovalToRO, PO_tbl_MasterWorkOrder.BarcodesComment, PO_tbl_MasterWorkOrder.ID
FROM PO_tbl_MasterWorkOrder
WHERE (((PO_tbl_MasterWorkOrder.CustomerPO)=[forms]![frmPO_WorkOrderMain]![Cust_POSearch]));