Solved

displaying multiple column on combo box in access?

Posted on 2012-03-26
5
480 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
5 Comments
 
LVL 45

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 - Access MVP) 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 39

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now