I've got a combo box which displays names and addresses, yet when you decide on which one to pick it only displays the surname, how can I get it to display the rest of the data that is originally shown in the drop down.
When the combobox is "at rest" it only shows the first visible column. You can get around that in either of two ways. Change the combo's recorsource query to add a field that concatinates all the data you want to show in the combo and don't include the base columns. So:
Select keyfld, LastName & ", " & FirstName & " - " & WorkPhone AS ContactInfo
From YourTable;
The other way is to add unbound text boxes to the form and in the AfterUpdate event of the combobox, populate the unbound text boxes.
I forgot to tell you that the combo's column array is zero based. The first column is referenced as (0), the second as (1), the third as (2), etc. Make sure the column number you are using is not past the end of the array.
PS, don't forget any hidden columns. It is best to look at the query to figure out the column numbers.
[This message has been edited by Pat Hartman (edited 05-22-2001).]
Open the property sheet for the form in design view, click on the combo box, click the "Other" tab on the property sheet the name of your combo box will be there copy and paste it after Me. add the column reference after.
HTH
Is your combobox a bound control? If it isn't, and your text boxes aren't bound, then none of the information is specific to the current record. The easiest way to fix this would be to bind the combo box to a field in the form's underlying datasource where you want to store the information that the combobox is selecting.