Question : How to reference a control on a tab page that is not currently displayed

This line,

    Debug.Print Me![NBInceptionDate]

gives this error:

"The expression you entered has a field, control, or property name that Database can't find"



So I tried to specify the tab page that the control is on,

   Debug.Print Forms!fm_NewBusiness.TabCtl4.Pages(2)![NBInceptionDate]

giving this error:

"Object does not support this property or method"


What's the secret to referencing a control on the current form, but on a tab page that is not currently displayed?

Answer : How to reference a control on a tab page that is not currently displayed

referencing a control in a tab control is straight forward

me.NameofControl

unless the control is in a subform, the you have to use

me.subformName.form.controlName
Random Solutions  
 
programming4us programming4us