There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Business Applications
Tag Cloud
audio blue blue screen boot bsod compaq computer cpu crash dell drivers dvd error excel firefox format freeze freezing hard drive hardware install internet internet explorer kb951748 lan laptop loss of internet malware memory motherboard network networking outlook outlook 2007 problem restart screen security slow sound trojan update virus vista windows windows xp winxp wireless zonealarm zone alarm
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Business Applications >
Combo Box & Displaying Multiple Columns


Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit 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, 12:05 PM #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,863 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
14-Jul-2008, 01: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,551 posts.
 
Join Date: Jun 2002
Location: Ontario,Canada
Experience: Intermediate
14-Jul-2008, 01: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, 02: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 want to help you solve your 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 03:27 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.