There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen blue screen boot computer connection crash css dell drive driver drivers email error ethernet excel explorer firefox firefox 3 hard drive internet internet explorer itunes laptop linux malware monitor network networking outlook outlook 2003 outlook express password printer problem problems ram router security slow software sound sprtcmd.exe trojan usb virus vista windows windows xp wireless
Business Applications
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Business Applications >
Combo Box & Displaying Multiple Columns


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
garen's Avatar
Junior Member with 2 posts.
 
Join Date: Jul 2008
14-Jul-2008, 11:05 AM #1
Combo Box & Displaying Multiple Columns
In Access 2003, have a form that I am viewing in Database-view as the default with a few combo boxes menus. Each of these combo boxes has two columns that display when you drop then down to make a selection, however, when you choose a selection, only the value of first colum is displayed in the "unopened" combo box. Is there a way to have all the columns' values displayed when the combo box is "unopen"?
Thank you!
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 6,565 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
14-Jul-2008, 12:37 PM #2
Hello garen and welcome to TSG, no I am afraid there isn't a direct way to display all of the columns once a selection has been made. If the first column is an ID number and therefore not very meaningful it is better to set it's Column width to 0cm. Only the second column will be visible then.
If you want to display the data from more than one "Field" (column) of your table in the combo you have to "Concatenate" the fields in to a new column in the Combo's SQL (Query) and display that single column instead of all the other columns.
For instance
Field 1 - First Name - data = "Fred"
Field 2 - Surname (or Last name) data = "Bloggs"
create a new Column Heading and type in

fullname: [First Name] & " " & [Surname]

the result displayed is
Fred Bloggs

You can "Concatenate" as many fields as you like using the & character to add them to each other. The " " just makes a space between them to make them readable, you could use " - " or ", " etc
__________________
.
.
OBP
I do not give up easily
Ziggy1's Avatar
Computer Specs
Senior Member with 1,474 posts.
 
Join Date: Jun 2002
Location: Ontario,Canada
Experience: Intermediate
14-Jul-2008, 12:49 PM #3
If I could suggest also...

You can add a text control and refer to the column, just experiment by changing the number...

Put this in the control source of the text box ( changing to match your object names of course)

=Forms!YourFormName!ComboName.column(2)
garen's Avatar
Junior Member with 2 posts.
 
Join Date: Jul 2008
18-Jul-2008, 01:23 PM #4
OBP, thanks a lot... I tried the Concatenate method and it is working great. Thank you!
Closed Thread

Tags
access 2003

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 09:35 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.