R
Renegade9797
I’m having problems with a form and subform. The main form is frmPriOrders
and is controlled by qryOrders, and contains customer name, invoice numbers
and dates. The sub form isfrmSubOrders and is controlled by
qryOrderDetailExtended, and contains the products that are ordered,
quantities, cost and extended cost. They are linked one to many by the
OrderID, which is set to autonumber. The purpose for the form is to record
each order, which customer ordered, what they ordered and when they ordered
it. On the main form there is a combo box CustomerID, which is sourced to
tblCustomer. On the sub form is a combo box ProductID, which is sourced to
qryProductOrders. This query is supposed to show only the products that
pertain to the customer in the CustomerID combo box.
I have the order form set to open in a new record, when I open the order
form and enter data the ProductID combo box works the way I want it to. If I
have multiple orders to enter, from different customers, this is where the
problem lies. After the first order is entered and I select a new record,
the ProductID combo box shows the products from the first customer. In order
for the form to work the way I want I would have to exit the form after each
Order was entered. I have tried to refresh the form and I’ve tried to run a
requery macro in the afterupdate event of the CustomerID combo box. Nothing
works.
and is controlled by qryOrders, and contains customer name, invoice numbers
and dates. The sub form isfrmSubOrders and is controlled by
qryOrderDetailExtended, and contains the products that are ordered,
quantities, cost and extended cost. They are linked one to many by the
OrderID, which is set to autonumber. The purpose for the form is to record
each order, which customer ordered, what they ordered and when they ordered
it. On the main form there is a combo box CustomerID, which is sourced to
tblCustomer. On the sub form is a combo box ProductID, which is sourced to
qryProductOrders. This query is supposed to show only the products that
pertain to the customer in the CustomerID combo box.
I have the order form set to open in a new record, when I open the order
form and enter data the ProductID combo box works the way I want it to. If I
have multiple orders to enter, from different customers, this is where the
problem lies. After the first order is entered and I select a new record,
the ProductID combo box shows the products from the first customer. In order
for the form to work the way I want I would have to exit the form after each
Order was entered. I have tried to refresh the form and I’ve tried to run a
requery macro in the afterupdate event of the CustomerID combo box. Nothing
works.