|
-
Jul 17th, 2000, 10:23 AM
#1
Thread Starter
Hyperactive Member
this HAS to be possible, since it can be done in Access:
How can I display more than one field as the ListField in a DataBound Combo? I want to display the values of fields LAST_NAME and FIRST_NAME for each record.
Thanks
Andrew
-
Jul 17th, 2000, 03:21 PM
#2
Addicted Member
Unfortunately MS in it's infinite wisdom has seen not to provide the same combo box to VB as it does for Access. Combox boxes in VB only support 1 field. The only way to get multiple fields into a VB combox box is to concatnate them together in the SQL string or in VB code.
This is a long standing complaint with the VB combo box. Many 3rd party vendors have been providing this type of control for a long time

Glenn D
Development/Analyst
-
Jul 17th, 2000, 05:32 PM
#3
Thread Starter
Hyperactive Member
How would I do that in SQL string? What would be the syntax?
-
Jul 18th, 2000, 08:33 AM
#4
Addicted Member
You can concatenate fields by using something like the following:
SELECT FirstName + LastName AS FullName FROM table
This will return a single column named FullName
This works for SQL Server, it should also work for Access.
 
Glenn D
Development/Analyst
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|