Solved

combobox dropdown

Posted on 2015-01-17
7
144 Views
Last Modified: 2015-01-19
vs2012 user
I have a combo box bound to data source
Is there a way to see at least 2 fields from the dataset in the dropdown mode before I select the dropdown item I want to commit to the field (left click the mouse)
Right click on the Item will do but I don't see that event
any help would be appreciated.
0
Comment
Question by:MBHEY131
  • 5
  • 2
7 Comments
 
LVL 18

Expert Comment

by:Simon
ID: 40555713
Concatenate the two fields to display them in the dropdown. You can still bind the dropdown to the field you want, but set the column width for that field to zero so that it doesn't display.
0
 

Author Comment

by:MBHEY131
ID: 40555873
do you mean add a NEW FIELD to the Query that fills the COMBOBOX and that NEW FIELD is made up of 2 or more fields of data that I want to show in the drop down?, I think I understand what your saying but I don't know how to accomplish the task, but I think I can figure it out in the SQL code, I am still very green at vs2012 as I am coming off of coding in FoxPro 2.6 of all things, thanx for the info. I will update your question but it may take some time to get this functionality up and working.
Mark
0
 
LVL 18

Accepted Solution

by:
Simon earned 500 total points
ID: 40556053
>do you mean add a NEW FIELD to the Query that fills the COMBOBOX and that NEW FIELD is made up of 2 or more fields of data that I want to show in the drop down?

Yes, that is what I meant. You'd concatenate the fields in your SQL code that provides the rowsource for the combobox.
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

Author Closing Comment

by:MBHEY131
ID: 40557254
That did work, took me a little time to get the SQL code right but THANX.
Mark
0
 

Author Comment

by:MBHEY131
ID: 40557268
But this is what I'm working on now, the dropdown gets populated with the correct concatenated data, but after the mouse selected correct code which at that point is "THE CONCATENATED DATA" (which is fine but I then would like the field populated with a different field "AFTER MOUSE SELECTION") and I've tried just about all the events within the COMBOBOX mouse up, down, enter, leave etc. to get the data chopped down to just 1 field and can't seem to present the data correctly, do you have an idea as to how this problem can be accomplished.
Thanx in advance
0
 

Author Comment

by:MBHEY131
ID: 40557273
THE combobox members I'm working with are primarily the "DISPLAY  MEMBER", "VALUE MEMBER" AND "SELECTED VALUE"
0
 

Author Comment

by:MBHEY131
ID: 40557286
Lostfocus and Gotfocus do exactly what I need
Thank You.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Office 2010 is Microsoft's latest edition to their office productivity collection. It "promises to include rich and powerful new ways to deliver your best work". So to start off, I have to say that I'm slightly disappointed... That bei…
A high-level exploration of how our ever-increasing access to information has changed the way we do our jobs.
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

825 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