Results 1 to 3 of 3

Thread: ComboBox. Dont Understand

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 1999
    Posts
    154

    Post

    I have a datagrid in my form. I have a combo box. The datagrid has a field called Employees ID. The combo Box displays the Employee ID. I have another table that has the employee name that is associated with the Employee ID. Is there a way to enter an SQL statement somewhere that will query the Employee ID against my table and display the employee name rather than the ID. I still want the ID to be stored in the Database. This is done in Access97 using an SQL statement in the RowSource.

    Thanks

  2. #2
    Lively Member
    Join Date
    Jul 1999
    Posts
    78

    Post Yep

    I'm assuming you have two tables; one is let's say a Materials Table, and the other is an Employee table.

    The Datagrid is based on Materials, with Employee ID being inside of it.

    Use the following Select style:

    SELECT [EMPLOYEE].EMPLOYEE_NAME
    FROM [EMPLOYEE] INNER JOIN MATERIALS ON [EMPLOYEE].EMPLOYEE_ID = MATERIALS.EMPLOYEE_ID;

    Let me know if this isn't what you were asking.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 1999
    Posts
    154

    Post

    I think I figured it out. I created two datagrids and used the DBCombo control and got it to work. Thanks for the help though.

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