PC Review


Reply
Thread Tools Rate Thread

Combo Box 2 Columns

 
 
=?Utf-8?B?QWxsYW4gU2t5bmVy?=
Guest
Posts: n/a
 
      3rd Mar 2006
I have a combo box that has two columns and when use the drop down both
columns are visible, however, when I select a record then only the detail
from column one shows in the display.

Can anyone help me correct this as I've checked all the properties and it
shows 2 columns with the correct widths etc.

Thanks in anticipation
 
Reply With Quote
 
 
 
 
Douglas J Steele
Guest
Posts: n/a
 
      3rd Mar 2006
Sorry, that's the way combo boxes are. When the list isn't descended, only a
single value will show.

If you really need multiple values visible, you can construct an artificial
column that concatenates the values in the query that acts as the recordset
for the combo box. Another option is to have text boxes that get populated
with the "hidden" columns once you select a row in the combo box. To do
this, you'd use the combo box's Column collection in its AfterUpdate event:

Private Sub MyComboBox_AfterUpdate()

Me.Text0 = Me.MyComboBox.Column(1)
Me.Text1 = Me.MyComboBox.Column(3)

End Sub

The code above would take the value from the second column of the selected
row in the combo box and put it in text box Text0, and the value from the
fourth column and put it in text box Text1. (Column starts counting at 0)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Allan Skyner" <(E-Mail Removed)> wrote in message
news:8A8B4B66-AFFE-4D87-A5BE-(E-Mail Removed)...
> I have a combo box that has two columns and when use the drop down both
> columns are visible, however, when I select a record then only the detail
> from column one shows in the display.
>
> Can anyone help me correct this as I've checked all the properties and it
> shows 2 columns with the correct widths etc.
>
> Thanks in anticipation



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combo Columns =?Utf-8?B?UGFw?= Microsoft Access Forms 1 18th May 2007 10:18 AM
binding a combo box to with 2 lookup columns to two source columns =?Utf-8?B?c21hcnR5?= Microsoft Access Form Coding 6 22nd Jun 2006 08:30 AM
Re: writing one combo box with two columns to two columns in table John Vinson Microsoft Access Forms 0 22nd Jul 2005 07:23 PM
Re: writing one combo box with two columns to two columns in table Rick B Microsoft Access Forms 3 21st Jul 2005 06:11 PM
writing one combo box with two columns to two columns in table sushi155 Microsoft Access Forms 0 21st Jul 2005 04:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:43 PM.