datatextfield in combo box

G

Guest

I have a combo box that has in it a value. It's an unbound combo box that
gets populated based on SQL code being executed in the codebehind file.

What it displays now is a salesrep name. When you click on it, it selects
the correct field (repname, which is a code that is different than the
firstname, lastname that is displayed in the combo box).

I need to add something to the combo box in order to display the company
name in a format like the following:

(company) RepFirstname RepLastname

I don't want anything to change on the value that's being selected
(repcode), but just want to make the combo box look differently.

The SQL I have that gives me the appropriate field & formatting of it is:

select '(' + summarytable.ssalesgroup + ') ' as salesgroup1,
salesreptable.sDescription, salesreptable.srepcode from salesreptable inner
join summarytable on summarytable.ssalesrepcode = salesreptable.srepcode
and summarytable.ssalesgroup = salesreptable.ssalesgroup
group by summarytable.ssalesgroup, salesreptable.sDescription,
salesreptable.srepcode order by summarytable.ssalesgroup,
salesreptable.srepcode

The where clause gets populated based on some other combo box selections.

How do I get the (company) repdescription to display without changing what's
selected (which is sufficient in the select code). I only need to display
the company name in order to assist the users who work with a number of reps
and companies.

Thanks,

SC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,187
Latest member
RosaDemko

Latest Threads

Top