Solved

How to assign multiple colums to a listfield in datacombo control

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
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.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

757 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now