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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help changing SUBFORM FIELD PROPERTY from parent form (in VBA) 1

Status
Not open for further replies.

Lynx03

Programmer
Sep 4, 2003
5
US
I need to change the .ColumnHidden property on fields in a subform. I can change it without problem if I'm on that form with

Me!Payments.ColumnHidden = -1

but can't seem to change a Child form's field properties from code in the Parent form. I've tried several variations of this code:

Forms!frmAgentCallListsubform!Payments.ColumnHidden = -1

It usually says that it can't find the form "frmAgentCallListsubform". I'm working in Access2000. It also works fine if I use the menu bar but I need to hide/unhide based on combo box choices (AfterUpdate event on Parent form).

If anyone can help I'd REALLY appreciate it! Thanks!
 
Hi

Do you need to use the FORM property of the subform control, something like:

Me.frmAgentCallListsubform.FORM.Payments.ColumnHidden = -1


Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Most excellent! Thank you; it worked perfectly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top