Solved

displaying multiple column on combo box in access?

Posted on 2012-03-26
5
488 Views
Last Modified: 2012-03-27
Hi,

I am trying to display the following data on the combo box.

departmentID, institutioname, departmentname

Column count 3
Column width 0;3;3
Bound Column 1

I want to see both institution and departmen name when I click it.
But When I make the selection, I want the combo box to display the department name.

But the institution name gets instead.
Do I need to change the order?
But I want Institu and department name in that order to display.
0
Comment
Question by:dkim18
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 47

Assisted Solution

by:Martin Liss
Martin Liss earned 50 total points
ID: 37766878
Instead of trying to use multiple columns in a combobox, use a Listview instead. There are lots of example here of doing that.
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 250 total points
ID: 37766884
The combo box is going to display the first non-zero column  after the selection.
You may be able to adjust the Row Source ... concatenate fields together for display, etc.

mx
0
 
LVL 5

Assisted Solution

by:Aruiz04
Aruiz04 earned 100 total points
ID: 37766892
If there are multiple departments for each institute, I would make two combo boxes, the first for institute and the second for departments, that way after selecting the institute you should requery the departments combobox.
On the other hand if it doesn't matter the order and you don't want to add two comboboxes then yes, you should re order the columns
0
 
LVL 47

Assisted Solution

by:Dale Fye (Access MVP)
Dale Fye (Access MVP) earned 50 total points
ID: 37767009
I would recommend MX's comment above as one good method.

As he mentioned, the value that gets displayed after you select the item will be the first column with a display width > 0, so you might be able to accomplish this by switching the order of your Department and Institution columns in your combo box to:

departmentID, departmentname, institutioname
0
 
LVL 40

Assisted Solution

by:als315
als315 earned 50 total points
ID: 37767031
In addition to MX and Fyed:
you can sort your columns independently from order.
order
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question