Multiple line display in a Combo Box

OmegaConcern

New member
Local time
Today, 08:52
Joined
Dec 4, 2007
Messages
2
Hi all,

I'm designing a form that needs a populated drop down list so users can only select from certain entries. I've set up a combo box ("CB") for this purpose. Here's the tricky part: the data in the CB pulls from 5 fields in a table (name, address, phone, fax and email). I need to get the box to show the data like this:

Name
Address
Phone
Fax
Email

I'm linked to the appropriate table and I can get it to show the drop with all fields (in a data sheet view) and I can select an option but when I select, it only displays the name, not the other 4 fields (i.e. click the drop down arrow and get "name/address/phone/fax/email" for all records, select a record and what shows in the box is "name" only).

I did something at one point where I got it to work, but it was missing a field (name was set up as "memo", not "text" in the table) and I screwed it up somehow and now I can't find my way back. Please help!!

Thanks!
 
A combo box only displays one line. A list box can display more than one line. You can have a combo box and 4 text boxes and assign the COLUMN values from the combo to the text box.
 
increase "column count" to 5 (exmp)
 
Simple Software Solutions

Hi

I am at a loss as to why you would want a CB to display mutiple items for every record vertically?

What is the purpose of this exercise and how did you come up with this methodology?

Surely you would be better to display them horizontally record by record then you could use the Column(x) to retrieve the desired data using the bound column.

Code Master::confused:
 
Hi

I am at a loss as to why you would want a CB to display mutiple items for every record vertically?

What is the purpose of this exercise and how did you come up with this methodology?

Surely you would be better to display them horizontally record by record then you could use the Column(x) to retrieve the desired data using the bound column.

Code Master::confused:

The data that's being shown in the box is the name and contact info of the vendor that provides the service. What I want to do is have it display in the same way you'd address an envelope.

I'm definitely open to suggestions.
 
Simple Software Solutions

Hi

Ok???

If you have any room on your form why not create a simple little address window underneath the combo box and when the user clickc on a name in the CB it displays the remainder of the details in the box below.

If your combo box has muli columns you can use following code:

CB_OnClick

Me.Address = Cb.Column(1) & vbNewLine & Cb.Column(2) & vbNewLine & Cb.Column(3) & vbNewLine ..... etc

This makes it more efficient as the user does not have to scan every fourth item in the list do read the persons name.


Code Master::cool:
 

Users who are viewing this thread

Back
Top Bottom