Clearing the Value in a Combo Box

dennyryan

Registered User.
Local time
Today, 00:41
Joined
Dec 21, 1999
Messages
45
I am limiting the values in a combo box, ComboBox2, based on a selection in another combo box, ComboBox1. I get the drop-down list of values to change in ComboBox2 but the displayed value is still retained from the prior selection.

For example, the first time through the user may have selected 100 from the drop-down list in Comb-Box2 but then goes back and selects a different category in ComboBox1. The new drop-down list in ComboBox2 now starts at 300 but the value of 100 is still displayed until the user selects a new value from the list.

How do I clear the value in ComboBox2 to force the user to select a new valid value?

Thanks,

Denny
 
I hope I understand the question.
In the After Update event of ComboBox1 place this code:

Private Sub ComboBox1_AfterUpdate()
Me![ComboBox2] = ""
Me![ComboBox2].Requery
End Sub

This should set the value in ComboBox2 to "" if you change the value in ComboBox1. It will also requery ComboBox2.

HTH
RDH
 
You understood what I wanted perfectly. The suggestion worked fine. Thanks a lot!
 

Users who are viewing this thread

Back
Top Bottom