Solved

How to assign multiple colums to a listfield in datacombo control

Posted on 2001-06-20
3
287 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

Independent Software Vendors: 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

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

730 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