Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27214

VS 2010 ComboBox Add Item (True, False converting to text)

$
0
0
Hello, I have one table with Name (text), Surname (text), Gender (bit; Male, Female). I want to display this data to ComboBox, so I use this code:

Code:

        For Each Comb1 In Comb.Table1s
            ComboBox1.Items.Add(Comb1.Name & "," & Comb1.Surname & "," & Comb1.Male & "," & Comb1.Female)
        Next

Because I use (bit) as declaration of field Gender is in ComboBox displayed as True or False:

Name:  CB1.JPG
Views: 35
Size:  11.6 KB

Any idea, how to convert first "True" to Male, "False" to "empty"; second "True" to Female, "False" to "empty"

Thanks for sugestions...
Attached Images
 

Viewing all articles
Browse latest Browse all 27214

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>