Update Text Box

D

Debra Ann

Access 2003

I have two combo boxes that have lookup queries from a table with two
columns. I want the second combo box to automatically update to whatever the
text is in the second column that matches the results of column 1:

Table:
Column 1 Column 2
A 1
B 2
C 3

So if I pick B from the dropdown of the first combobox, I was 2 to
automatically show up in the second combobox.

How do I do this?

Thanks,

DebraAnn
 
J

Jeanette Cunningham

Me.[Combo1] = Me.[Combo2] = Me.[Combo1].Column(1)


Replace Combo1 and 2 with your own object names.



Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
J

Jeanette Cunningham

If the second combo is really a textbox, you can do it like this-->
Assuming the textbox is unbound, you can put this in its control source.
=[Combo1].Column(1)


Replace Combo1 with your own object names.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 

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