Results 1 to 4 of 4

Thread: DataBound Combo ListField

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Columbia, SC USA
    Posts
    374

    Unhappy

    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

  2. #2
    Addicted Member
    Join Date
    Jan 2000
    Location
    Oshkosh, WI
    Posts
    163

    Angry

    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

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Columbia, SC USA
    Posts
    374
    How would I do that in SQL string? What would be the syntax?

  4. #4
    Addicted Member
    Join Date
    Jan 2000
    Location
    Oshkosh, WI
    Posts
    163
    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
  •  



Click Here to Expand Forum to Full Width