Hi,
I am developing a Windows application in VB.Net 2003 where I need to use a combo box to display a list containing the following comma separated fields;
1) Client’s Last Name
2) Client’s First Name
3) Client’s Telephone Number
What I would like is for the user to start typing the client’s last name in the editable portion of the combo box and the drop down portion of the combo box to be automatically filled with the above fields (last name, first name and telephone number) for all clients with last names starting with the letter(s) entered. Since we have a number of clients with the same last and first name, we decided to use the telephone number to uniquely identify the client to the operator taking the call.
I have achieved this by creating a temporary table and filling it with the above fields (using a stored procedure in MS Access) along with an additional field I call the “display field” which is a combination of the three fields listed above. I fill the combo box with this display field only.
What I cannot get to work is for the user to select (using the mouse) a client from the dropdown list and then display only the client’s last name in the editable portion of the combo box. Based on the selected client’s ID field, the rest of the client’s details are displayed else where on the form (this part works, but the last name is always blank - WHY??).
I would appreciate any help you could give me.
Regards,
Larry Carter
I am developing a Windows application in VB.Net 2003 where I need to use a combo box to display a list containing the following comma separated fields;
1) Client’s Last Name
2) Client’s First Name
3) Client’s Telephone Number
What I would like is for the user to start typing the client’s last name in the editable portion of the combo box and the drop down portion of the combo box to be automatically filled with the above fields (last name, first name and telephone number) for all clients with last names starting with the letter(s) entered. Since we have a number of clients with the same last and first name, we decided to use the telephone number to uniquely identify the client to the operator taking the call.
I have achieved this by creating a temporary table and filling it with the above fields (using a stored procedure in MS Access) along with an additional field I call the “display field” which is a combination of the three fields listed above. I fill the combo box with this display field only.
What I cannot get to work is for the user to select (using the mouse) a client from the dropdown list and then display only the client’s last name in the editable portion of the combo box. Based on the selected client’s ID field, the rest of the client’s details are displayed else where on the form (this part works, but the last name is always blank - WHY??).
I would appreciate any help you could give me.
Regards,
Larry Carter