View Full Version : Adding fields in a subform


tariqshah
08-10-2000, 09:47 AM
Hi,
How do I add the contents of a certain field in a subform? For example, if I have sold ten items to someone and I want to add their costs together and display this at the bottom of the form?
Thanks, Tariq

lamha
08-10-2000, 10:04 AM
Go to the form Footer of your subform. Add an unbound text box. Set its control source to = sum([yourfieldname])

tariqshah
08-10-2000, 10:27 AM
Thanks, I'll give that a try.

Tariq

tariqshah
08-10-2000, 10:36 AM
Thanks for the help, but when I assign this I get #ERROR in the text box when it ttrys to work it out!!. (The Subform is a subform created from a query)
Please help!!!

Thanks, Tariq

lamha
08-10-2000, 11:44 AM
That's strange because it worked on my form. My subform also has the control source as a query. Did you forget the "=" sign? Maybe that would be the problem.

tariqshah
08-10-2000, 12:16 PM
Hi,
I definately had the = sign in, access did keep removing the space between it and the Sum function, would that be the problem?
I am using Access 2000, are you using a different version?
If anyone has any ideas they are welcome.

Thanks, Tariq