By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,984 Members | 2,832 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,984 IT Pros & Developers. It's quick & easy.

Trying to enter drop down box

P: 1
I have a small customer quote file that I keep track of customer prices in.

When I enter the prices when entering new customer quote, I would like to be able to choose my customerID from a drop down list which shows customerID and customer name and then populate the companyname field with the selection.

I am new to Access and have not been able to figure this out.

I can email a sample file for your viewing to clarify my question.

Any help would be greatly appreciated.


Nov 3 '08 #1
Share this Question
Share on Google+
2 Replies

P: 98
Are you wanting to look through a dropdown list to select a company and make it automatically insert into a field?

Nov 3 '08 #2

Expert 2.5K+
P: 3,532
Place a combobox on your form. When the wizard comes up

Select "I want combobox to look up values in a table/query"

Select your item/price table

Click to move CustomerID to right hand box

Click to move CustomerName to right hand box

Sort by CustomerID field

Select "Remember Value for later use"

Chose caption for label (if desired)


Now, in the AfterUpdate event for your combobox

Private Sub YourComboBoxName_AfterUpdate()
Me.CompanyName = Me.YourComboBoxName.Column(1)
End Sub

and Bob's your uncle! Notice that the column index is Zero-based, so the second item is Column(1)

Replace all the object names with your own names, of course.

Linq ;0)>
Nov 3 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.