Now im using the check box to select the several items.In that I want to insert all the Checked items into the database by clicking one command button.So, how can I inset all the checked items into the database ?.So kindly ayone answer me with the example codings.
Checkbox help?
Collapse
X
-
Tags: None
-
Originally posted by sreekandanNow im using the check box to select the several items.In that I want to insert all the Checked items into the database by clicking one command button.So, how can I inset all the checked items into the database ?.So kindly ayone answer me with the example codings. -
Originally posted by hariharanmcajust use control array and one for loop inside that usr your qury to insert or updateComment
-
Originally posted by sreekandanI have no idea about that, So please send me the example codings.
copy and past the check box and it will ask for create array give yes and use this type of code.
Private Sub Command1_Click( )
Dim i As Integer
For i = 0 To UBound(chkContr olArray)
If chkControlArray (i).Value = Checked Then
'Your Qry
End If
Next i
End SubComment
-
Originally posted by hariharanmcacopy and past the check box and it will ask for create array give yes and use this type of code.
Private Sub Command1_Click( )
Dim i As Integer
For i = 0 To UBound(chkContr olArray)
If chkControlArray (i).Value = Checked Then
'Your Qry
End If
Next i
End Sub
Code:Private Sub Command2_Click() Dim i As Integer For i = 0 To UBound(chkControlArray) If chkControlArray(i).Value = Checked Then con.Execute "insert into Table(t1)values('" & List1.Selected & "')" End If Next i End Sub
So kindly reply meComment
-
Originally posted by sreekandanI have written the following code
Code:Private Sub Command2_Click() Dim i As Integer For i = 0 To UBound(chkControlArray) If chkControlArray(i).Value = Checked Then con.Execute "insert into Table(t1)values('" & List1.Selected & "')" End If Next i End Sub
So kindly reply me
where its showing that errorComment
-
Originally posted by hariharanmcawhere its showing that errorComment
-
Originally posted by sreekandanwhile run that program that error is showing
Private Sub Command2_Click( )
Dim i As Integer
For i = 0 To UBound(chkContr olArray)
If chkControlArray (i).Value = Checked Then
con.Execute "insert into Table(t1)values ('" & List1.Selected & "')"
End If
Next i
End Sub
You gave
list1.Selected
its need selected index
list1.Selected( index)Comment
Comment