Novice here. I need code for an After Update event for a Combo Box on a main form.
I want to requery a combo box that is located in a subform of a subform which is located in a tab of a tab control.
Form: frmOpportunities
Tab Control: TabCtlOpps
Tab: General
Subform: sbfrmOppProjGeneral
Sub Subform: sbfrmOppProjContact
Control: cboContactPerson
Here is what I've tried:
Forms!frmOpportunities.TabCtlOpps.General.sbfrmOppProjGeneralInfo.sbfrmOppProjContacts.Form!Controls.cboContactPerson.Requery
(all on one line)
Thanks!
If the combo is on the main form, then you should be able to use something like:
me.sbfrmOppProjGeneral.for
But your subform description above says the subform name is sbfrmOppProjGeneral, but your line of code says "sbfrmOppProjGeneralInfo"
the general syntax for doing this is:
me.subformControlName.Form
Make sure the what you are using as the subform control name is if fact the name of the control, not the form (although they may be the same). In your case, the 2nd subform is simply the control on the 1st subform, so it would be:
me.1stSubformControlName.F