View Full Version : can someone please explain orders subform in northwind.mdb


pankajeshwara
01-02-2002, 06:03 PM
can someone please explain how the orders subform works in the northwind.mdb database.

what i would like to know is that how can you select something from the combo box and it can set the values in the orders subform.

SteveA
01-02-2002, 10:45 PM
A few things are happening.

1. There is some code in the AfterUpdate event of the Products field in the Orders Subform. This uses the product ID to retrieve the UnitPrice for the selected product and stores it in the Unit Price Field.

2. The ExtendedPrice field is automatically calculated by the underlying query for the Orders Subform

3. The totals appearing on the orders form are referenced from a calculated field in the orders subform that totals all the ExtendedPrices.

HTH
SteveA http://www.access-programmers.co.uk/ubb/smile.gif