-----------------------------------------------------------

New Message on MumbaiUserGroup

-----------------------------------------------------------
From: limson
Message 3 in Discussion

 
hi kishor  
           i am sending u my code.my problem is when select new country value on 
combobox1 the combobox 2 give me the city of the old country.that is which i have 
selected before selecting the new country. 
time_iid is(id of the user) 
cntnameng is(city name) 
Private Sub indimodify1_Load(ByVal sender As System.Object, ByVal e As 
System.EventArgs) Handles MyBase.Load 
Dim str_12 As String = "select id_country,countryname from timediff where timeid = " & 
time_iid & "" 
'Dim str_12 As String = "select distinct id_country,arabcountryname from timediff " 
Dim sql_12 As New OleDbDataAdapter(str_12, coned) 
Dim dst_12 As New DataSet() 
Dim i_12 As Integer 
sql_12.Fill(dst_12, "lister_12") 
'Dim groupy As String 
If dst_12.Tables("lister_12").Rows.Count > 0 Then 
For i_12 = 0 To dst_12.Tables("lister_12").Rows.Count - 1 
Dim nodpX_12 As String = dst_12.Tables("lister_12").Rows(i_12).Item("countryname") 
Me.ComboBox1.Items.Add(nodpX_12) 
Next 
End If 
Me.ComboBox1.SelectedIndex = 0 
End If 
Dim str_128 As String = "select timeid, cntnameng from timediff where timeid = " & 
time_iid & "" 
Dim sql_128 As New OleDbDataAdapter(str_128, coned) 
Dim dst_128 As New DataSet() 
Dim i_128 As Integer 
sql_128.Fill(dst_128, "lister_128") 
'Dim groupy As String 
If dst_128.Tables("lister_128").Rows.Count > 0 Then 
For i_128 = 0 To dst_128.Tables("lister_128").Rows.Count - 1 
Dim nodpX_128 As String = dst_128.Tables("lister_128").Rows(i_128).Item("cntnameng") 
Me.ComboBox2.Items.Add(nodpX_128) 
Next 
End If 
Me.ComboBox2.SelectedIndex = 0 
End sub 
Private Sub ComboBox1_Click(ByVal sender As Object, ByVal e As System.EventArgs) 
Handles ComboBox1.Click 
Dim str_12 As String = "select distinct id_country,countryname from timediff " 
Dim sql_12 As New OleDbDataAdapter(str_12, coned) 
Dim dst_12 As New DataSet() 
Dim i_12 As Integer 
sql_12.Fill(dst_12, "lister_12") 
'Dim groupy As String 
If dst_12.Tables("lister_12").Rows.Count > 0 Then 
For i_12 = 0 To dst_12.Tables("lister_12").Rows.Count - 1 
Dim nodpX_12 As String = dst_12.Tables("lister_12").Rows(i_12).Item("countryname") 
Me.ComboBox1.Items.Add(nodpX_12) 
Next 
End If 
End Sub 
Private Sub ComboBox1_SelectionChangeCommitted(ByVal sender As Object, ByVal e As 
System.EventArgs) Handles ComboBox1.SelectionChangeCommitted 
Me.ComboBox2.Items.Clear() 
Dim coun_name As String 
coun_name = Me.ComboBox1.SelectedText 
MsgBox(coun_name) 
  
Dim str_128 As String = "select timeid, cntnameng from timediff where countryname = '" 
& coun_name & "'" 
Dim sql_128 As New OleDbDataAdapter(str_128, coned) 
Dim dst_128 As New DataSet() 
Dim i_128 As Integer 
sql_128.Fill(dst_128, "lister_128") 
'Dim groupy As String 
If dst_128.Tables("lister_128").Rows.Count > 0 Then 
For i_128 = 0 To dst_128.Tables("lister_128").Rows.Count - 1 
Dim nodpX_128 As String = dst_128.Tables("lister_128").Rows(i_128).Item("cntnameng") 
Me.ComboBox2.Items.Add(nodpX_128) 
Next 
End If 
 
End Sub

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/mumbaiusergroup/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to