combo box values

J

Jeff

I am using a combo box in a form to populate criteria in a
simple query.

When I insert a textbox on a report referring to the combo
box, I am getting the autonumberid, but what I'd really
like to display is the 2nd column of the underlying table.

For example, I am selecting business units, and if I
select "Finance", the report will show

"Payroll hours for" [1] "department".

How can I insert a text box which will populate the report
with [Finance], and not its DepartmentID.

Thanks
 
D

Dan Artuso

Hi,
Use the Column property of the combo:
=Forms!yourForm!yourCombo.Column(1)

0 will rfer to the 1st column, 1 to the 2nd and so on.
 
G

Guest

Thanks - I'll give it a try.
-----Original Message-----
Hi,
Use the Column property of the combo:
=Forms!yourForm!yourCombo.Column(1)

0 will rfer to the 1st column, 1 to the 2nd and so on.

--
HTH
Dan Artuso, Access MVP


Jeff said:
I am using a combo box in a form to populate criteria in a
simple query.

When I insert a textbox on a report referring to the combo
box, I am getting the autonumberid, but what I'd really
like to display is the 2nd column of the underlying table.

For example, I am selecting business units, and if I
select "Finance", the report will show

"Payroll hours for" [1] "department".

How can I insert a text box which will populate the report
with [Finance], and not its DepartmentID.

Thanks


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top