CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: DataCombo

  1. #1
    Join Date
    Jul 2000
    Posts
    135

    DataCombo

    I have a datacombo whose data source is adodc (access 2000). The two items in the table are employee name and employee number with the key being the employee name. When I open the form and the data combo loads it lists the employee name in emp number order.

    I need the bound text to be the employee number, but, I want the displayed text to be the employee name so that a user can key the name and scroll down.

    What controls how it displays.

    Thanks in advance.


  2. #2
    Join Date
    Jan 2000
    Location
    Saskatchewan, Canada
    Posts
    595

    Re: DataCombo

    Just set the Listfield property

    David Paulson


  3. #3
    Join Date
    Jul 2000
    Posts
    135

    Re: DataCombo

    The list field property is the correct data. I went to the access table and changed the spelling of my last name and the change reflected in the combo box. The combo box is displaying the correct data (the emp name) but in emp number order which is not how the table is set up.

    Thanks in advance



  4. #4
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: DataCombo

    In adodc RecordSource instead of the table name enter the SQl
    select * from Table order by empnumber

    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

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

Featured