Thread: exact syntax
View Single Post
  #4  
Old January 4th, 2010, 02:20 PM posted to microsoft.public.access.forms
Al Campagna[_2_]
external usenet poster
 
Posts: 1,462
Default exact syntax

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" wrote in message
...
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" wrote:

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."

"Revned" wrote in message
news
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




.