From: babs on
I am having a hard time getting the syntax right for a control on a subform.

I have the table that tells you

use
forms!mainform!subform1.form!controlName

but I have Forms and subforms for some reason the Object Name listed is not
always the same name that I have for the Caption property for the form. and
do you use the Name for the controlbox not the record source.

What is the real name??? you use for the subform?

thanks,
Barb
From: John W. Vinson on
On Mon, 26 Apr 2010 18:19:01 -0700, babs <babs(a)discussions.microsoft.com>
wrote:

>I am having a hard time getting the syntax right for a control on a subform.
>
>I have the table that tells you
>
>use
>forms!mainform!subform1.form!controlName
>
>but I have Forms and subforms for some reason the Object Name listed is not
>always the same name that I have for the Caption property for the form. and
>do you use the Name for the controlbox not the record source.
>
>What is the real name??? you use for the subform?
>
>thanks,
>Barb

A Form has a Name property. It also has a Caption property. These are
independent; you need the main form's Name property (not its Caption) in the
mainform slot above.

A Form may have a Subform Control on it. This isn't the form, it's the box
containing the form; the Subform Control has a Name property and a
SourceObject property. The Name property of the Subform control is what goes
in subform1 in the syntax above.

The Name of the form *inside* that box - the SourceObject - is not used in
referencing controls on the subform, just the name of the box (the Subform
Control object).
--

John W. Vinson [MVP]
From: Gina Whipp on
Babs,

This might help...

http://www.mvps.org/access/forms/frm0031.htm

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"babs" <babs(a)discussions.microsoft.com> wrote in message
news:05D0A590-1860-43E6-8D87-DB91945728B5(a)microsoft.com...
I am having a hard time getting the syntax right for a control on a
subform.

I have the table that tells you

use
forms!mainform!subform1.form!controlName

but I have Forms and subforms for some reason the Object Name listed is not
always the same name that I have for the Caption property for the form. and
do you use the Name for the controlbox not the record source.

What is the real name??? you use for the subform?

thanks,
Barb