By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,145 Members | 1,624 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,145 IT Pros & Developers. It's quick & easy.

Sum of a field of a subform on a Main Form !

P: n/a
I have a (Main) form named : Stocks_Main
and a Subform in that named: Stocks_Data

The Subform is a continuous form
There is a field in the subform called QTY_IN

Now ... on the main form i.e. Stocks_Main I have set a text box to
display a total of the QTY_IN control (which is on the subform).

I am using the foll code as the control source for the text box
=Sum(nz(Forms!Stocks_Main!Stocks_Data.Form!QTY_IN) )

but keep getting a #Error
Could someone please correct it for me.

Thx & Best Rgds,
Prakash.

Dec 10 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
my idea:
create a control(total) on subform with control source: = sum([QTY_IN])
then in control source of text box(mainform) set
= forms!mainform!subform!control_name(total)
Dec 11 '06 #2

P: n/a
Thx !! I already moved my control from the Main Form into the
Sub-Form.

However I'd still like to get it to work from the Main Form if possible
without the
sum([QTY_IN]) control being on the Sub-Form.

If you or anyone comes up with a solution please drop me a line. I'd
greatly appreciate it.

Thx & Best Rgds,
Prakash.

luanhoxung wrote:
my idea:
create a control(total) on subform with control source: = sum([QTY_IN])
then in control source of text box(mainform) set
= forms!mainform!subform!control_name(total)
Dec 11 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.