S
steve
hi,
I was wondering if there is any way around the following:
I am populating two (synchronized) comboboxes from database fields. The first box is binded to a primary key and therefore is never empty, however the second can be empty depending on the first one's value:
cmb1 cmb2
---------------------------
112 hello
221 mary
334 (null)
443 (null)
111 john
Is there any way to detect and *replace* with another string the null values ?
I tried this:
Private Sub cmb2_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmb2.TextChanged
If cmb2.Text = "" Then
cmb2.Text="-?-"
End If
End Sub
but it raises an exception !!!!?????
What I would like to have ideally is the second list being populated only with non-null values. but if the user scrolled on the first list he would be able to see all values and the null ones on the second list would be replaced by some text (like: -?-).
Is this possible?
Thanx in advance!
-steve
I was wondering if there is any way around the following:
I am populating two (synchronized) comboboxes from database fields. The first box is binded to a primary key and therefore is never empty, however the second can be empty depending on the first one's value:
cmb1 cmb2
---------------------------
112 hello
221 mary
334 (null)
443 (null)
111 john
Is there any way to detect and *replace* with another string the null values ?
I tried this:
Private Sub cmb2_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmb2.TextChanged
If cmb2.Text = "" Then
cmb2.Text="-?-"
End If
End Sub
but it raises an exception !!!!?????
What I would like to have ideally is the second list being populated only with non-null values. but if the user scrolled on the first list he would be able to see all values and the null ones on the second list would be replaced by some text (like: -?-).
Is this possible?
Thanx in advance!
-steve