Code for Requery for a Combo Box Located in a Sub Subform in a Tab Control

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!
rsb1222Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dale FyeCommented:
the tab control is immaterial to this discussion.

If the combo is on the main form, then you should be able to use something like:

me.sbfrmOppProjGeneral.form.sbfrmOppProjContact.form.cboContactPerson.requery

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.controlname.requery

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.Form.2ndSubformControlName.Form.Controlname.requery
0
Dale FyeCommented:
now that I think about it, some of those should be bangs, try:

me!sbfrmOppProjGeneral.form!sbfrmOppProjContact.form!cboContactPerson.requery
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.