WAP for making a combo box which contains the country names and shows the capital for corresoponding country in another combo box.
_______________________________________________________________
Private Sub Command1_Click()
If Combo1.ListIndex = 0 Then
Combo2.Clear
Combo2.AddItem ("NEW DELHI")
ElseIf Combo1.ListIndex = 1 Then
Combo2.Clear
Combo2.AddItem ("ISLAMABAD")
ElseIf Combo1.ListIndex = 2 Then
Combo2.Clear
Combo2.AddItem ("COLOMOW")
ElseIf Combo1.ListIndex = 3 Then
Combo2.Clear
Combo2.AddItem ("KATHMANDU")
ElseIf Combo1.ListIndex = 4 Then
Combo2.Clear
Combo2.AddItem ("TOKYO")
Else
MsgBox ("Select Valid Country")
End If
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Load()
Combo1.AddItem ("INDIA")
Combo1.AddItem ("PAKISTAN")
Combo1.AddItem ("SRILANKA")
Combo1.AddItem ("NEPAL")
Combo1.AddItem ("JAPAN")
End Sub
_________________________________________________
OUTPUT
_________________________________________________
____________________________________
DOWNLOAD
____________________________________
Download its form
Download its Image
No comments:
Post a Comment