Trying to use combobox column value on a report

I have a form that has a combobox.  Then on a report I am trying to reference in the control source of a field on the report, that comboboxes 2nd column.  (1st column after the key column)

Here is what I'm using but I get a #Name? error in the field:

=[Forms]![frmTimeReportingHeader]![cboProject].[Column(1)]
SteveL13Asked:
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.

Rey Obrero (Capricorn1)Commented:
is the form frmTimeReportingHeader open ?
and is there an item selected in  combo [cboProject]?
PatHartmanCommented:
There are situations where you can't reference the properties of controls except from within the form/report itself.  To get around the problem, you can do one of two things.
1. modify the form to join to the lookup table (usually with a left join to avoid loosing records).  Then you can refer directly to the bound field  rather then refering to it in the combo.
2. add a hidden field to the form.  In the AfterUpdate event of the combo, copy the .Column(1) property to the hidden field and reference the hidden field.

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
SteveL13Author Commented:
Answers/comments:

is the form frmTimeReportingHeader open ?   -  YES.
and is there an item selected in  combo [cboProject]?   -  YES

1. modify the form to join to the lookup table (usually with a left join to avoid loosing records).  Then you can refer directly to the bound field  rather then refering to it in the combo.  -  I UNDERSTAND
 2. add a hidden field to the form.  In the AfterUpdate event of the combo, copy the .Column(1) property to the hidden field and reference the hidden field.  -  SOMETIMES IS DO THIS BUT IT ALWAYS FEELS "SLOPPY" WITH HIDDEN FIELDS ON A FORM.  MAYBE IT'S JUST ME.
Your Guide to Achieving IT Business Success

The IT Service Excellence Tool Kit has best practices to keep your clients happy and business booming. Inside, you’ll find everything you need to increase client satisfaction and retention, become more competitive, and increase your overall success.

PatHartmanCommented:
There are cases where Access thinks it is smarter than you.  You can't win.  This is especially true for reports.  Since Access knows that a report cannot be updated, it rebuilds the query you so carefully constructed as the record source and ELIMINATES any field NOT bound to a control.  Therefore, if you have a piece of code that does a calculation
Me.somefield = Me.A + Me.B
and A and B are not bound to controls, the calculation will fail because A and B are no longer part of the recordset.
SteveL13Author Commented:
Pat.  Sometimes I know Access is smarter than I am.  I am going to go ahead with:

"add a hidden field to the form.  In the AfterUpdate event of the combo, copy the .Column(1) property to the hidden field and reference the hidden field."
PatHartmanCommented:
I've been working with Access since the early 90's and no piece of software has EVER impressed me more.  The foresight of the initial team was scary good.  And then there's the little annoying things like this one.  I'm sure this problem was introduced later by some lesser developer.
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.