Refer to a control on subform

G

Guest

Hello,
I have a subform on Tab Control (tab control number 2). The subform is
defined as Continuous Forms.
The subform contain a text box for calculating the sum of products shipped
(called SumDelivered = Sum([UnitsShipped]).
I would like to refer from my main form to this control for doing some
calculation. What is the syntax?
Main form: frmOrder
Sub Form: frmDelivery
Your help is appreciated.
 
J

John Vinson

Hello,
I have a subform on Tab Control (tab control number 2). The subform is
defined as Continuous Forms.
The subform contain a text box for calculating the sum of products shipped
(called SumDelivered = Sum([UnitsShipped]).
I would like to refer from my main form to this control for doing some
calculation. What is the syntax?
Main form: frmOrder
Sub Form: frmDelivery
Your help is appreciated.

The tab control doesn't come into the equation at all as far as
referencing is concerned. If you're referencing from the mainform, the
only things you need are the name of the Subform Control (which is
often the same as the name of the Form within that control but can be
different) and the name of the control:

=frmDelivery.Form!SumDelivered

should work.

John W. Vinson[MVP]
 
R

ruralguy via AccessMonster.com

Merry Christmas Joseph and you too John,
John nailed it but here is a link to put in your favorites.
http://www.mvps.org/access/forms/frm0031.htm
Hello,
I have a subform on Tab Control (tab control number 2). The subform is
defined as Continuous Forms.
The subform contain a text box for calculating the sum of products shipped
(called SumDelivered = Sum([UnitsShipped]).
I would like to refer from my main form to this control for doing some
calculation. What is the syntax?
Main form: frmOrder
Sub Form: frmDelivery
Your help is appreciated.
 
G

Guest

Tkank for you help and Merry Christmas to you and your family.

ruralguy via AccessMonster.com said:
Merry Christmas Joseph and you too John,
John nailed it but here is a link to put in your favorites.
http://www.mvps.org/access/forms/frm0031.htm
Hello,
I have a subform on Tab Control (tab control number 2). The subform is
defined as Continuous Forms.
The subform contain a text box for calculating the sum of products shipped
(called SumDelivered = Sum([UnitsShipped]).
I would like to refer from my main form to this control for doing some
calculation. What is the syntax?
Main form: frmOrder
Sub Form: frmDelivery
Your help is appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top