exact syntax

  • Thread starter Thread starter Revned
  • Start date Start date
R

Revned

Hi,

I want to know what is the proper syntax if i am going to display a
summation result to mainform from a subform???

Thank you
 
Revned,
You want the "exact" code, but you haven't given us
any information about your form, your subform, or your
totals field in that subform?

I'll use example object names... use your own in your code.

= Forms!MainFormName!SubFormName.Form!SubTotal
--
hth
Al Campagna
Microsoft Access MVP 2006-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
thank you for your time Al Campagna I appreciate it,

sorry for not elaborating my question so far, this is it what i have done now
i have my mainform frmOrders with a subform [qryOrders subform]
in my subform i have Amount field name

I make a summation for this field Amount under Form Footer =sum([Amount])
with a control name txtTotal
now how would I write my code to display the result in the mainform?? i try
using the one you have given me but no result is being display..

please can you help me again in figuring it out...

thanks again....
 
Revned,
Given a main form named [frmOrders], and a subform named
[qryOrders Subform], and a control in that subform called [txtTotal]...

Place an unbound text control on the main form, and give it a
Control Source of...
= [Forms]![frmOrders]![qryOrders Subform].Form![txtTotal]

Note: Try to avoid names with spaces, and also try to be a bit
more descriptive with those names. It will make your coding more
efficient, and clearer. Ex. txtTotal might be txtTotalAmount, or
txtTotalOrderAmount
Also, use standard notation for your object names.
Ex. [qryOrders Subform] should be frmOrdersSubform. (without
spaces, no bracketing required)
--
hth
Al Campagna
Microsoft Access MVP 2006-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

Revned said:
thank you for your time Al Campagna I appreciate it,

sorry for not elaborating my question so far, this is it what i have done
now
i have my mainform frmOrders with a subform [qryOrders subform]
in my subform i have Amount field name

I make a summation for this field Amount under Form Footer =sum([Amount])
with a control name txtTotal
now how would I write my code to display the result in the mainform?? i
try
using the one you have given me but no result is being display..

please can you help me again in figuring it out...

thanks again....

Al Campagna said:
Revned,
You want the "exact" code, but you haven't given us
any information about your form, your subform, or your
totals field in that subform?

I'll use example object names... use your own in your code.

= Forms!MainFormName!SubFormName.Form!SubTotal
--
hth
Al Campagna
Microsoft Access MVP 2006-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your
life."




.
 
Thank you very much, I take note of that advise...thanks again I really
appreciate your time

Al Campagna said:
Revned,
Given a main form named [frmOrders], and a subform named
[qryOrders Subform], and a control in that subform called [txtTotal]...

Place an unbound text control on the main form, and give it a
Control Source of...
= [Forms]![frmOrders]![qryOrders Subform].Form![txtTotal]

Note: Try to avoid names with spaces, and also try to be a bit
more descriptive with those names. It will make your coding more
efficient, and clearer. Ex. txtTotal might be txtTotalAmount, or
txtTotalOrderAmount
Also, use standard notation for your object names.
Ex. [qryOrders Subform] should be frmOrdersSubform. (without
spaces, no bracketing required)
--
hth
Al Campagna
Microsoft Access MVP 2006-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

Revned said:
thank you for your time Al Campagna I appreciate it,

sorry for not elaborating my question so far, this is it what i have done
now
i have my mainform frmOrders with a subform [qryOrders subform]
in my subform i have Amount field name

I make a summation for this field Amount under Form Footer =sum([Amount])
with a control name txtTotal
now how would I write my code to display the result in the mainform?? i
try
using the one you have given me but no result is being display..

please can you help me again in figuring it out...

thanks again....

Al Campagna said:
Revned,
You want the "exact" code, but you haven't given us
any information about your form, your subform, or your
totals field in that subform?

I'll use example object names... use your own in your code.

= Forms!MainFormName!SubFormName.Form!SubTotal
--
hth
Al Campagna
Microsoft Access MVP 2006-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your
life."

Hi,

I want to know what is the proper syntax if i am going to display a
summation result to mainform from a subform???

Thank you




.


.
 
Revned,
Well, thanks, but... we really would like to know if that worked
for you...
--
hth
Al Campagna
Microsoft Access MVP 2006-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

Revned said:
Thank you very much, I take note of that advise...thanks again I really
appreciate your time

Al Campagna said:
Revned,
Given a main form named [frmOrders], and a subform named
[qryOrders Subform], and a control in that subform called [txtTotal]...

Place an unbound text control on the main form, and give it a
Control Source of...
= [Forms]![frmOrders]![qryOrders Subform].Form![txtTotal]

Note: Try to avoid names with spaces, and also try to be a bit
more descriptive with those names. It will make your coding more
efficient, and clearer. Ex. txtTotal might be txtTotalAmount, or
txtTotalOrderAmount
Also, use standard notation for your object names.
Ex. [qryOrders Subform] should be frmOrdersSubform. (without
spaces, no bracketing required)
--
hth
Al Campagna
Microsoft Access MVP 2006-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your
life."

Revned said:
thank you for your time Al Campagna I appreciate it,

sorry for not elaborating my question so far, this is it what i have
done
now
i have my mainform frmOrders with a subform [qryOrders subform]
in my subform i have Amount field name

I make a summation for this field Amount under Form Footer
=sum([Amount])
with a control name txtTotal
now how would I write my code to display the result in the mainform?? i
try
using the one you have given me but no result is being display..

please can you help me again in figuring it out...

thanks again....

:

Revned,
You want the "exact" code, but you haven't given us
any information about your form, your subform, or your
totals field in that subform?

I'll use example object names... use your own in your code.

= Forms!MainFormName!SubFormName.Form!SubTotal
--
hth
Al Campagna
Microsoft Access MVP 2006-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your
life."

Hi,

I want to know what is the proper syntax if i am going to display a
summation result to mainform from a subform???

Thank you




.


.
 
Back
Top