IT_Student_604
New member
i want my other combo boxes to generate the names of the candidates that are members of the party list the voter had selected in my partylist combo box.. i've tried playing on my codes but still nothing was retrieved by my combo boxes.
here's my code:
---
i'm trying to retrieved the name of the candidate pertaining on the position they're running and the party list selected using the partylist combo box
----------------------
really need ur help so badly guys.. please please.. >_<
thanks in advance
here's my code:
- Private Sub cbPres_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbPres.SelectedIndexChanged
- constr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source = " & Application.StartupPath & _
- "\SSC_Automation.mdb; Persist Security Info = False"
- cn.ConnectionString = constr
- cmd = New OleDbCommand("select Lname,Fname,MI from tblCandidates where CandPosition='President'" _
- & "and PartylistName='" & cbPartylist.Text, cn)
- cn.Open()
- dr = cmd.ExecuteReader
- While dr.Read()
- cbPres.Items.Add(dr("Lname") & dr("Fname") & dr("MI").ToString())
- End While
- cn.Close()
- End Sub
---
i'm trying to retrieved the name of the candidate pertaining on the position they're running and the party list selected using the partylist combo box
----------------------
really need ur help so badly guys.. please please.. >_<
thanks in advance