|
-
Mar 3rd, 2004, 11:55 AM
#1
Thread Starter
New Member
Combobox holding surnames from Access
A pointer here would be great.
I have a form in which I want to display data contained in an Employees table in Access.
On loading, I have populated a Combobox on the form with people's surnames selected from the Employees table. When I select one of these surnames I want to get the whole row from the Employees table associated with that person and fill in the relevant employee details on the form.
I think I need something like:
[VB]cmd.CommandText = "SELECT * FROM Employees WHERE EmployeeID=" & EmployeeID[/VB]
but I only have the surname on the Combobox to go with and if there are multiples of identical surnames in the table I'll only ever retrieve the first entry with that surname. Is there a way to 'hide' the ID in the Combobox maybe???
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
|