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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suming a calculated field in subform

Status
Not open for further replies.

northernbeaver

Programmer
Jul 9, 2001
164
0
0
CA
I have a form whith a subform. on the subform there are three fields of inportance:

qty : a text field-numeric value that lists the quantity

ItemId : a combo box with three columns (ID;Name;Value)

txtCalculated : a text field with controlsource of =([Qty]*ItemID.column(2))

I want to have a sum of txtCalculated on the footer of the subform so I created text field on the form footer with a control source of =sum(([Qty]*ItemID.column(2))) but I get an error. any ideas?
 
Is the name of the filed you ar summing txtCalculated?

If so it should read

Sum([txtCalculated])

I would probably add a an Nz function for null sets

Nz(Sum([txtCalculated]),0)

I would also make sure that the format property for txtCalculated was set to the correct number type...such as currency or General Number.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top