Solved

How to assign multiple colums to a listfield in datacombo control

Posted on 2001-06-20
3
289 Views
Last Modified: 2006-11-17
I want two fields (code,descr) to be assigned to the listfield property for my datacombo control. Its easy to assign one field from the recodset but two dont seem to work.
0
Comment
Question by:mccainz2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 3

Expert Comment

by:jrspano
ID: 6211176
you can only assign 1 to show in the db combo.  you could buy 3rd party controls to do this.  true dbcombo is a good one.  you could also not use a data bound combo and concatinate the 2 fields together in a string and then add the string to the combo box.
0
 

Accepted Solution

by:
nomulap earned 50 total points
ID: 6211323
Here is a work around.

You can write a query for example:

Select Code || '  ' || Desc as CodeDesc from table1. (Basically the select statement is combining the two
fields to one field, this syntax should work for Oracle, you might have to tweak it for other databases)

Then set the ListField property of the dbcombo to "CodeDesc" field of the resultset.
0
 
LVL 5

Author Comment

by:mccainz2
ID: 6211801
just had to rewrite for t-sql. select x+y as z from source.
BTW: Most people get a little peeved when you propose answers as it locks the question. SOP here is always propose as a comment.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

707 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