Access 2010 Referencing subform combobox in query

Currently using with no query results

[Forms]![fNEW_DENTAL_HEALTH_SALES_BONUS_REPORTS]![f_HEALTH_PRODUCER_NAMES].[Form]![cboProducer_Number]

Not sure what the problem is as it does not show any records when query runs.  What am I doing wrong?
deer87Asked:
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.

omgangIT ManagerCommented:
I have a form with a subform.  On the form the subform is named 'subform_tblCategories'; note that the actual name of the form being used as a subform may be different.
If I want to reference a form control on the subform I can do it like this (where Category is control on the subform).

Debug.Print Me.subform_tblCategories.Form!Category

So, on your form named fNEW_DENTAL_HEALTH_SALES_BONUS_REPORTS, is the subform object named f_HEALTH_PRODUCER_NAMES?

OM Gang
0
Rey Obrero (Capricorn1)Commented:
check if "f_HEALTH_PRODUCER_NAMES" is the name of the subform control,
open form NEW_DENTAL_HEALTH_SALES_BONUS_REPORTS in design view
select the subform control and hit F4, look for the value listed on the Name property on the Other tab

use the name listed in your code

[Forms]![fNEW_DENTAL_HEALTH_SALES_BONUS_REPORTS]![SUBFORM CONTROL NAME].[Form]![cboProducer_Number]
1

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
deer87Author Commented:
Checked all the form names but still no result in query criteria

[Forms]![fNEW_DENTAL_HEALTH_SALES_BONUS_REPORTS]![f_HEALTH_PRODUCER_NAMES].[Form]![cboProducer_Number]

Hey Capricorn 1  glad to hear from you.  

Even opened subform in form mode and discluded the main form name in the query criteria stlll with no results.
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
RE ![cboProducer_Number]

This assumes Column (0) is the Bound Column (column property is zero based).  Is Column (0) ie physical Column 1 the Bound Column ?
1
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.