Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form / Subform Driving Me To Drink!

Status
Not open for further replies.

rjf3123

Technical User
Sep 29, 2003
9
US
Here's the skinny:

I have a form (Orders) with a subform (OrderDetails).

Order details subform Fields: Item, Quantity, UnitPrice, ExtPrice.

There is a field called OrderTotal in the footer of the subform.

I pick an Item from the list, have a DLookup get the UnitPrice from the table for that item, enter the Quantity and the control for ExtPrice is [UnitPrice]*[Quantity]. This works fine.

In the field [OrderTotal], the control is =Sum([ExtPrice])

Back on the Orders form, I have a text box to display the OrderTotal field. The control for the text box is =[OrderDetails Subform].[Form]!OrderTotal

That is where the problem is ... I am not getting the total of all the ExtPrice records on the OrderDetails subform.

Any ideas???

Thanks all in advance :)

R. Fisher
 
Try putting thing in the Record Source of your Orders Detail Subform:

SELECT [Order Details].*, [Quantity]*[UnitPrice] AS ExtPrice
FROM [Order Details];

And

In the OrderTotal control this: =Sum(Nz([ExtPrice]))
 
Can't thank you enough ... works perfectly!

R. Fisher
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top