|
-
Feb 24th, 2000, 02:48 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. This is done in Access97 using an SQL statement in the RowSource. I was hopeing VB has a way to do this similar to Access97 where I could enter an SQL query in the DataSource or DataField parameters. If not then I suppose I can opendatabase, query for info and then close database, but that seems like alot of work for every time you move from one record to another.
Thanks
-
Feb 24th, 2000, 06:03 AM
#2
Addicted Member
If I were you, I would use a hiden datacontrol with late binding to load whole data once and bind the other table controls with datacontrol. Whenever you want to show a specific record by selecting combo item or clicking datagrid table, just move datacontrol to that record. Well, I am not fully understanding your question. If you just want to know the employeeName, You can hide a column "employee name " in your datagrid. Hope it helpful.
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
|