Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to refer to a property on a nested subform

Status
Not open for further replies.

Shaker36

Programmer
Nov 20, 2001
8
0
0
CA
How can I refer to a property on a nested subform. The syntax for referring to a control on a nested subform does not work when referring to a property of a nested subform.

Forms!EmployeeAbsenceForm!AbsencePeriodCtl.Form!AbsenceDayCtl.Form.allowedits = true

Does not work! Any Ideas?

Thanks!
 
Try this...

Just make sure that the names you put in are the control names, not the form names...

--James



Forms!EmployeeAbsenceForm!AbsencePeriodCtl!AbsenceDayCtl.allowedits = true


junior1544@jmjpc.net
Life is change. To deny change is to deny life.
 
Yes I'm aware of that problem and I did do that but still it doesn't work. The Microsoft knowledgebase article that explains references does not give an example of how to refer to the property of a nested subform.
 
Forms!EmployeeAbsenceForm!AbsencePeriodCtl.Form!AbsenceDayCtl.allowedits = true

Will work, assuming you got the names right. Why does your form's name end in Ctl? That usually means control.

The generic syntax, assuming a main form named frmMain and a subform named frmSub and a control on the subfrom named txtYadda, is:

forms!frmMain!frmSub.form!txtYadda

The idea is that you are referring to a control on the main form, then telling access that you want to reach into that control's form collection and grab a control in there.

Hope this helps.

Jeremy =============
Jeremy Wallace
Designing and building Access databases since 1995.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top