Auto insert into one combo box based on another's value

G

Guest

This is similar to the topic "Multiple control update from one drop-down
box". But instead of having two combos displaying the same data, I wish to
have them display different values.

For instance, "Combo1" and "Combo2" are formatted as single-precision
numbers. Combo1 values are "21", "30", and "50". "Combo2" values are "1",
"2", and "3". If "21" is selected for Combo1, I would like Combo 2 to
display "1". If "30" is selected for Combo1, I would like Combo 2 to display
"2". The same for "50" and "3". All the while these values are recorded to
2 separate fields in the database.

It works fine having 2 separate controls, but I would like to simplify the
form. Any suggestions are greatly appreciated.
 
H

halfbodyguy

AfterUpdate Event on Combo 1 would be

If combo1="21" Then Combo2="1"
If combo1="30" Then Combo2="2"
If combo1="50" Then Combo2="3"

And at that point you would probably want combo2 to be a locked
TEXTBOX, rather than a combo box, if i am correct in assuming that you
only need to select the combo1 value. Then Just make sure that combo1
and combo2 are tied to the correct recordsources and you are off and
running. Make sense?
 
G

Guest

It worked perfectly. I even made changes to another label that I wanted to
autopopulate. Thank you very much for the help.
 

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