|
-
Jan 20th, 2005, 05:12 PM
#3
Re: DB lookup using a combo box
You would first have get all records you need from table using perhaps ADO Recordset, Connection objects. To get records you'll also need some SQL statement like:
Select * From Employee Where Dpt = 'IT'
You'll then loop through your recordset and add <LastName & " " & FirstName> to your combobox just like Hack demonstrated.
After that you have two choices: either populate some UDT with the rest of info but simultaniously with combobox so indexing will be in-sync OR you'll have search recordset every time.
If you use array of UDT then upon secting new name from combo - you'll get rest of info from your UDT and populate your textboxes.
If you have any problem with implementing all of the above - give me a buzz.
Good luck.
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
|