Lookup Wizard

G

Guest

I used the lookup Wizard for Company Name and this works great. The problem
is I have two fields Company ID and Company Name when they use the pull down
and select a company name I would like it to take the Company ID that is
associated with that company name and put it in Company ID.

The way I have it working now is when they use the pull down they see both
Company ID and Company Name, but when they make their selection it only
populates Company Name.

By the way I am relatively new to Access.

Thanks for ANY HELP !

Ty
 
A

Andi Mayer

I used the lookup Wizard for Company Name and this works great. The problem
is I have two fields Company ID and Company Name when they use the pull down
and select a company name I would like it to take the Company ID that is
associated with that company name and put it in Company ID.

The way I have it working now is when they use the pull down they see both
Company ID and Company Name, but when they make their selection it only
populates Company Name.
in the conboBox-control you will find: Bound Coloumn

if your Company_Id is the seconde coloumn you have to set it to 2
 
G

Guest

It does say "2" - the pull down is on company name and when the user clicks
the pull down it shows "company ID" and "Company Name" - when they select
this it only populates "Company Name" - how do I get it to populate the
"Company ID" field of the "Company Name" that they selected.

Ty
 
A

Andi Mayer

It does say "2" - the pull down is on company name and when the user clicks
the pull down it shows "company ID" and "Company Name" - when they select
this it only populates "Company Name" - how do I get it to populate the
"Company ID" field of the "Company Name" that they selected.
"company ID"=1
"Company Name"= 2

its now up to your guess if you want 1 or 2 as the bound field

there is a 50% change to fail, so it cost you less time to try it out
then to post
 
G

Guest

Now I am even more confused - sorry don't understand what you are trying to
tell me.
 
P

Penguin

In the AfterUpdate of the combo box try this:

Me!CompanyID = Me!ComboBox.Column(#)

Replace # with your column your are trying to get the data from.

Hope this helps
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top