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???