Solved

Display the second field in a combo box after a selection is made

Posted on 2013-02-06
1
346 Views
Last Modified: 2013-02-06
I have a table that has CustomerNumber as the first field and CustomerName as the second field.

The invoice form has a combo box where the user can enter the customer number. We want the customer number to be displayed in this field. But when the user clicks the drop-down arrow for the combo box, we want the user to be able to type a customer name and have it jump to that customer name as they type. Once they have made a selection, we want the customer number to be displayed in the combo box.

Is there a way to do this? If I make the first visible column in the combo box the customer name, the drop-down typing works fine but the customer name is displayed in the field once a selection is made. If I make the first visible column the customer number, the typing in the drop-down goes by customer number instead of name.

Thanks in advance.
0
Comment
Question by:jrmcanada2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 300 total points
ID: 38861731
No can do...

A combobox can only display the value from one Field.

You can, however, display any column from the combobox in a textbox on the form.

Code roughly like this on the afterupdate event of the combobox:

Me.txtCustID=me.YouCombo.Column(0)
(this presumes that the first column in the combobox is the CustID)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question