So I've built a database that looks like this:
tblCustomers: customerID, firstname, lastname, outstandingBal
tblOrders: orderID, customerID, receivedDate, dueDate, comments
tblOrderDetails: orderID, productID, quantity, notes, unitPrice
tblProducts: productID, name, description, unitPrice
Then I made a form that looks like this:
frmOrders - subfrmOrders - subsubfrmOrders
With frmOrders being a single sheet and the other two being datasheet.
Out the 3 forms here: The one that is connected to the Customer table is frmOrders, the subfrmOrders is connected to the Orders table, and then the subsubfrmOrders is connected to the Order Details form.
What I've done so far is to filter the Orders table depending on the combobox value of the Customer, so I only see orders for that customer. However, I can't get the Order Details to filter down to only the order that I expand by clicking the + on the left side. I set the record source of the subsubform to:
SELECT tblOrderDetails.orderID,
tblOrderDetails.productID,
tblOrderDetails.quantity,
tblOrderDetails.notes,
tblOrderDetails.unitPrice
FROM tblOrderDetails
WHERE tblOrderDetails.orderID=[Forms]![subfrmOrders]![txtOrderID]
With txtOrderID being the field name of the order ID in the subform. When I click on the +, I get a little pop up box asking me to input the parameter value for txtOrderID. I've set the subsubform to Requery in the Change and AfterUpdate event procedures of txtOrderID, however, nothing's working. How can I fix this?
tblCustomers: customerID, firstname, lastname, outstandingBal
tblOrders: orderID, customerID, receivedDate, dueDate, comments
tblOrderDetails: orderID, productID, quantity, notes, unitPrice
tblProducts: productID, name, description, unitPrice
Then I made a form that looks like this:
frmOrders - subfrmOrders - subsubfrmOrders
With frmOrders being a single sheet and the other two being datasheet.
Out the 3 forms here: The one that is connected to the Customer table is frmOrders, the subfrmOrders is connected to the Orders table, and then the subsubfrmOrders is connected to the Order Details form.
What I've done so far is to filter the Orders table depending on the combobox value of the Customer, so I only see orders for that customer. However, I can't get the Order Details to filter down to only the order that I expand by clicking the + on the left side. I set the record source of the subsubform to:
SELECT tblOrderDetails.orderID,
tblOrderDetails.productID,
tblOrderDetails.quantity,
tblOrderDetails.notes,
tblOrderDetails.unitPrice
FROM tblOrderDetails
WHERE tblOrderDetails.orderID=[Forms]![subfrmOrders]![txtOrderID]
With txtOrderID being the field name of the order ID in the subform. When I click on the +, I get a little pop up box asking me to input the parameter value for txtOrderID. I've set the subsubform to Requery in the Change and AfterUpdate event procedures of txtOrderID, however, nothing's working. How can I fix this?