How to make ComboBox values change

antifashionpimp

Registered User.
Local time
Today, 23:09
Joined
Jun 24, 2004
Messages
137
Hi,

I have a form with two ComboBoxes (see attached db).

I want the second combo box to display only "Yards" after the first ComboBox has been set to "Yards". Otherwise, when the first ComboBox's value is "Meters", then the second ComboBox should display "Meters" and "Yards".

What is wrong with the code in my After_Update event for the first ComboBox?

Thanks in advance!!

J
 

Attachments

Code:
Me.cbo2.RowSource = "Meters;Yards"
 
Thanks, that works!

But I still want something: when I change to Yards, the Yards must display in the second ComboBox. I don't want to have to click the drop-down arrow to see it.
Isn't this what the .DefaultValue property is supposed to do?

Regards,

J
 
Thanks for your help. I tried it out, but it still does not quite what I want.

After adding

Me.cbo2.Dropdown after Me.cbo2.RowSource = "Yards", I still initially have "Meters" in the drop-down box, and then Yards "drops down" beneath it.

I don't want the user to see that Meters is available when choosing Yards in the first ComboBox.

Please !
 
Do you really need the second combo box to be a combo box? You could make the second combo box just a text box and enter

=[Cbo1].[column](0) in the control source of the new text box's properties.
 

Users who are viewing this thread

Back
Top Bottom