Using UnBound Column of a ComboBox in a Report

jiblankman

Registered User.
Local time
Today, 14:56
Joined
May 27, 2008
Messages
43
I have a combobox in a form which lists the PanelID and PanelDescription from a query.
Column 1: PanelID (This column is bound)
Column 2: PanelDescription

The row source for the combobox is SELECT [PanelDescriptions].[ID], [PanelDescriptions].[panelDescription] FROM PanelDescriptions;

The users want the PanelID to show in the field so that they can enter a single digit number. However, on the report I want the PanelDescription to show.

I am calling the report using a commandbutton on the form. Everything works great except the PanelID is listed instead of the PanelDescription.

Can someone please tell me how to correct this? Thanks.
 
You can simply have an identical combo box on the report which has the first column width=0 so that the second column shows. The dropdown arrow won't show except in design view.

Alternatively, change the recordsource of your report so that your PanelDescriptions table is linked on the ID (joined so that all records from your main table show and only show PanelDescription records if they exist) and then bring down your description as a field. You can now show the description directly on your report.

Finally, if you're referencing a combo box that will always be the same for all records (which I don't think is the case, but just in case...) then you can use forms![FormName]![ComboName].Column(1) as the recordsource for a text box on your report. Note that column numbers start at 0.
 
Thanks Kafrin the forms call solved my problem. I was missing the "forms!" from the command. Because the panelId has to be entered and is used to determine which report is used, this was the easiest way to go.
 

Users who are viewing this thread

Back
Top Bottom