Referencing a Subform's Control On A Tab Control

  • Thread starter Thread starter Tru
  • Start date Start date
T

Tru

I am trying to reference a control (txtName) on a subform
(cfrmComPicturesSUB) which is on a tabControl (tabItems)
page 2 or index 2.
I tried using the following syntexts:

a) Me!tabItems.Pages(2).Controls!
[cfrmComPicturesSUB].Form![txtName]

b) Forms![cfrmComInfo]![cfrmComPicturesSUB].Form![txtName]
 
(b) is correct *provided* that [cfrmComPicturesSUB] is the
name of the Subform*CONTROL*. The SubformCONTROL name may
be different from the name of the Form being used as
Subform (or more technically accurate, being used as the
SourceObject of the SubformControl).

You need to find the correct SubformControl name from the
DesignView of the main Form [cfrmComInfo].

HTH
Van T. Dinh
MVP (Access)
 
Back
Top