J
Jess
I have a continuous subform within a form. This continuous subform is used by
my users (CustomerID) to enter a new order (OrderID). An order is composed of
one or multiple items (ItemID). The main form and the subform are joined
trough the CustomerID field. Each record in the continuous subform represents
an ItemID for a given order (OrderID) and a given customer. The main form has
the customer info (CustomerID, address, etc.).
This subform also keeps track of every order entered by my users (OrderID).
My subform is based upon a table with multiple fields, the most important
ones previously cited: CustomerID, OrderID, ItemID.
I do not wish my users (CustomerID) to be ordering the same item (ItemID)
twice for a given Order (OrderID).
I find this not so simple. If I query the table my subform is based on in
the before_update sub, changes/additions will not be in the table: Access has
not saved them yet; I would have to access the "dirty content" of the OrderID
field text property. The fact that my subform is continuous makes it
difficult for me to access the "dirty content" (text property) of the ItemID
combobox –I have to move the focus.
How can I accomplish this? I am pretty sure that somebody has come up with a
good approach. I do not want to reinvent the wheel.
my users (CustomerID) to enter a new order (OrderID). An order is composed of
one or multiple items (ItemID). The main form and the subform are joined
trough the CustomerID field. Each record in the continuous subform represents
an ItemID for a given order (OrderID) and a given customer. The main form has
the customer info (CustomerID, address, etc.).
This subform also keeps track of every order entered by my users (OrderID).
My subform is based upon a table with multiple fields, the most important
ones previously cited: CustomerID, OrderID, ItemID.
I do not wish my users (CustomerID) to be ordering the same item (ItemID)
twice for a given Order (OrderID).
I find this not so simple. If I query the table my subform is based on in
the before_update sub, changes/additions will not be in the table: Access has
not saved them yet; I would have to access the "dirty content" of the OrderID
field text property. The fact that my subform is continuous makes it
difficult for me to access the "dirty content" (text property) of the ItemID
combobox –I have to move the focus.
How can I accomplish this? I am pretty sure that somebody has come up with a
good approach. I do not want to reinvent the wheel.