extract value from combo box

  • Thread starter Thread starter Shetty
  • Start date Start date
S

Shetty

Dear Friends

I have got 2 nos combo boxes in my form

On focus event of 2nd combo following actions must happen
1. automatic drop down on focus if current value is null
2. search and select the value from the combo list which is matching to
value of column(2) of combo1


Please help me out

Thanks & Regards

Ramesh Shetty
 
Why do you need it to automatically drop down if you're going to match the
value for it? The code below only drops down the combo if nothing's chosen
in the first combo:

Private Sub MySecondCombo_GotFocus()
If IsNull(Me.MyFirstCombo) Then
Me.MySecondCombo.Dropdown
Else
Me.MySecondCombo = Me.MyFirstCombo.Column(2)
End If
End Sub
 
Back
Top