Linked forms

  • Thread starter Thread starter Nathan
  • Start date Start date
N

Nathan

I'm working on a database listing customers and their
orders in two respective tables. The tables are linked
with a one-to-many relationship via the customer number.
I've created a "Customers" and an "Orders" form as well.
There is a button on the Customers form that opens up the
Orders form. I want the forms to work in such a way that
opening the Orders form from the Customers form will list
only those orders associated with that customer. So far
I have figured that part out. However, when entering new
orders in this manner, I want to be able only to enter
orders for the current customer and not for any other
customer. That is, the customer number on the Orders
form must be defaulted to the the customer that is open
on the Customers form. Is there a way to do this? (I
know there is a way to work with main forms and subforms,
but using separate forms is better for my situation.)
 
Set the DefaultValue of the controls that have customer information, such as the
CustomerID, to the value on the Customer Form. Set these controls as Locked=True so that
the user can't change them.
 
Back
Top