Results 1 to 3 of 3

Thread: ComboMombo :: Adding a Data Member to a combobox

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2003
    Posts
    10

    Question ComboMombo :: Adding a Data Member to a combobox

    I have a ComboBox that I need to fill with customerLastName and customerFirstName. ( I need to add a comma too) It should look like this:

    Doe, John

    After I set the ComboBox's source and the DataMember, it works, but how can I add a second Data Member (customerFName) and the comma?? Also, should I code it or use Visual Studio in Designer Mode.
    Grant Carmichael
    www.evanced.net

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    You don't, you have to concat the two fields in your query and use that as the DisplayMember.

    "SELECT *,CustomerLastName + ', ' + CustomerFirstName AS CustomerFullName FROM Customers"

    Then bind the DisplayMember to CustomerFullName

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2003
    Posts
    10
    Thanks
    Grant Carmichael
    www.evanced.net

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