accessing data on a subform...

  • Thread starter Thread starter Brad Pears
  • Start date Start date
B

Brad Pears

I can not find the sytax for accessing subform data. I thought it was like
this...

strText = forms![MainFormName]![SubFormName].[Field1] but this doens;t
seem to work....

Can some one help me?


Thanks,

Brad
 
Replace SubFormName with:

NameOfSubformControl.Form

The NameOfSubformControl is the name of the control on the main form that
holds the subform. To get the name of this control, open the main form in
design mode, open the Properties sheet, click on the subform ONE time. The
Properties sheet should show the name of the subform control. If you click
on the subform a second time, you'll be in the subform and the Properties
sheet will show the name of the subform, not the control holding it.
 
Still having problems with the syntax....

The subform control name is child-issues... So to access the field "field1"
on this subform how would I write the reference?

forms![frmMain]![child-issues.form].[Field1] ????

Thanks,

Brad

Wayne Morgan said:
Replace SubFormName with:

NameOfSubformControl.Form

The NameOfSubformControl is the name of the control on the main form that
holds the subform. To get the name of this control, open the main form in
design mode, open the Properties sheet, click on the subform ONE time. The
Properties sheet should show the name of the subform control. If you click
on the subform a second time, you'll be in the subform and the Properties
sheet will show the name of the subform, not the control holding it.

--
Wayne Morgan
MS Access MVP


Brad Pears said:
I can not find the sytax for accessing subform data. I thought it was like
this...

strText = forms![MainFormName]![SubFormName].[Field1] but this doens;t
seem to work....

Can some one help me?


Thanks,

Brad
 
Back
Top