Control reference on a tab

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

I have a form that has a subform. On the subform I have a control that I am
referencing by

Forms!frmStatementAffairs.Form!frmCreditor.Form!cbocredbranch (this code
works)

I have now added frmstatementAffairs onto a Tab on a separate form.

How would I reference the control?

I have tried using

1)
Forms!frmIncExp.form!frmStatementAffairs.Form!frmCreditor.Form!cbocredbranch
(Field frmStatementAffairs not found.)
2) Forms!frmStatementAffairs.pgeSOA.pages(5)!frmCreditor.Form!cbocredbranch
(Object does not support this property or method)
 
When you want to go from the main form to a control on a
subform, you must set the focus to the subform control
first and then set the focus to the control on
the subform:

Me!NameOfSubformControl.SetFocus
Me!NameOfSubformControl.Form!NameOfFieldOnSubform.SetFocus

Or if you are in the subform already
[Forms]![Nameofmainform]![Nameofsubform].[Form]![nameofcontrol]

Chris
 
Back
Top