which one is form name

B

babs

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
 
G

Gina Whipp

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

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
 
J

John W. Vinson

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

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