Solved

How to assign multiple colums to a listfield in datacombo control

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

829 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