|
-
Feb 24th, 2000, 02:12 AM
#1
Thread Starter
Addicted Member
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
-
Feb 24th, 2000, 04:53 AM
#2
Lively Member
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.
-
Feb 24th, 2000, 04:58 AM
#3
Thread Starter
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|