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
Printable View
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
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
:):)
How would I do that in SQL string? What would be the syntax?
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.
:):)