R
Richard Horne
Hi guys, bit of a tricky one here and I can't seem to find satisfactory
answers anywhere so hoping you can help.
I have a form which contains 7 parameters. 4 combo boxes and 3 text fields.
The user selects entries on any of the combo boxes or types text in any of
the text fields. They do not have to fill in all 7, it could be any
combination of the 7.
Under this form is a sub form which will display results according to which
fields are set above but how do I code my query to accept any of the above?
My main form is called Orders_Queried and my sub form is called
Order_Query_Results
The 7 fields are:
cboQueriedCustomer
cboQueriedContact
cboOrder_Complete
cboProduct
txtQueriedCustRef
txtDescription
txtTypeColourSize
The first part of my query is:
Now obviously my query needs to be set to show results where fields are
equal to the combo box entries, but for the txt fields then the results need
to be like. But how do I code this so it will display the results no matter
which combination of parameters are set.
answers anywhere so hoping you can help.
I have a form which contains 7 parameters. 4 combo boxes and 3 text fields.
The user selects entries on any of the combo boxes or types text in any of
the text fields. They do not have to fill in all 7, it could be any
combination of the 7.
Under this form is a sub form which will display results according to which
fields are set above but how do I code my query to accept any of the above?
My main form is called Orders_Queried and my sub form is called
Order_Query_Results
The 7 fields are:
cboQueriedCustomer
cboQueriedContact
cboOrder_Complete
cboProduct
txtQueriedCustRef
txtDescription
txtTypeColourSize
The first part of my query is:
Code:
SELECT Orders.OrderNumber, Orders.[Customer Name], Orders.[Order Date],
Order_Details.[Item Number], Order_Details.[Item Type],
Order_Details.Description, Order_Details.Type_Colour_Size,
Order_Details.Quantity, Order_Details.Price, Order_Details.Denomination,
Order_Details.Department, Orders.Complete
FROM Orders INNER JOIN Order_Details ON Orders.OrderNumber =
Order_Details.OrderNumber
WHERE
Now obviously my query needs to be set to show results where fields are
equal to the combo box entries, but for the txt fields then the results need
to be like. But how do I code this so it will display the results no matter
which combination of parameters are set.