Default Value in Combo-Box

Frankenoid

Registered User.
Local time
Today, 16:50
Joined
May 30, 2002
Messages
10
I have a combo box (cboCase) whose rowsource is populated by the selection made in a previous combo-box (cboClient). At least 90% of the time, there is only one item in the cboCase list. When there is more than 1 item, I have cboCase do a drop down to alert the user that the client has more than one case file. If there is only 1 matter, and the cboCase has only 1 line in its row, how do I automatically select that item?

Thanks for your help -- Franki
 
Try this.

On the After_Update of the cboClient

yourcode....
Me.cboCase.Requery
if Me.cboCase.Listcount =1 then
Me.cboCase.Value = Me.cboCase.Itemdata(0)
End If
 
Just got the chance to try your solution (I was in the midst of a family reunion at my house with my 5 siblings, our parents, and various nieces, nephews and spouses); works beautifully -- thanks.
 

Users who are viewing this thread

Back
Top Bottom