Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Want a different column to display 1

Status
Not open for further replies.

srogers

Technical User
Aug 15, 2000
201
US
On my report the ID (key) is displaying but I want the other column, the names.

In my table when I click on the field it shows that it is a lookup and it uses a combobox for it's display control. When I created the form it displays correctly, showing me names of items and not the autonumber ID.

But when I created a report the autonumber ID appears on it. How can I change that to display the names of the items?

Thanks.
 
Where are the names for the forms combobox coming from? Table, Value List, etc. If from another lookup table we can change the recordsource of the report to a query and include this other lookup table. We would need a left join between the data table and the lookup table on the unique autonumber field that you are referring to. Then include the name from the lookup table as a column in your query. Name and Save this query and use it as the new RecordSource for your report. This will now provide you with the name you are looking for to be displayed in your report.

Post back with any questions concerning this suggestion.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
The names for the combobox are coming from a table with just two fields. One is the autonumber ID and the other is the names. I will try your suggestion later today. Thanks so much for your reply.
 
Now that I have re-read your thread here I think you can make a direct reference to the combobox from the control source of a control in the report. Just refer to column(1) of the combobox.

Code:
=FORMS![i]frmyourformname!comboboxname.column(1)[/i]

This should pull in the second column and display in the control on the report.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top