combo box values

  • Thread starter Thread starter Jeff
  • Start date Start date
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
 
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.
 
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


.
 
Back
Top