I need a little help with a db im designing, i have an orders details form which sits on the mail client form and displays the details of any given clients order when the relivent clients order is clicked in the subform above it. the Client order subform has a ProductID field which is based on a list of products in the products table.
The Products table had the following fields: ProductID, ProductName, UnitPrice, Quanity (this is for later use when i manage to get the stock side of db working) and Discontinued Fields.
What i need the form to be able to do is the following: when i select a product from the drop down list in the order details subform the price form the selected product populates the UnitPrice field on the order delats form.
Can this be done? all help given greatly recieved, Ive attached a copy of the db please feel free to have a look.
What I have given you is VBA code. Delete any macro or anything else associated with the After Update event. In design view for the subform display the Properties form and click on the Event tab. Click on the ProductID combo box to select it. Then click on the elipsis against the After Update event and choose Code Builder. After you've added the statement the module should look like the following.