hello guys I have a question i hope you can help me, to solve this.
I have a Database using Ms Access 2003 and the table name is "Subject" in Subject i have 2 fields "StudentID" and "Subject" and in My vb 6.0 I have 6 checkbox. then in My checkbox.caption is the Available subject , example in my Checkbox1 with caption namely a "Math" and checkbox2 "English" and it is Posible directly Save in Database when i Check All Checkbox?
thanks in advance
Page 1 of 1
2 Replies - 1987 Views - Last Post: 31 January 2013 - 11:40 PM
Replies To: Inner Join in VB 6.0
Re: Inner Join in VB 6.0
Posted 19 January 2013 - 06:29 AM
Your description is unclear and I don't have VB6 to refer to, but in principle you might do something like:
Dim ck As CheckBox Dim conn As Connection Dim rs As Recordset Dim iStudentID As Integer 'or String 'get iStudentID from a textbox or wherever 'create the connection and recordset With rs For Each ck In ckbArray 'for each checkbox in a Control Array If ck.Checked Then .AddNew .Fields("StudentID") = iStudentID .Fields("Subject") = ck.Caption .Update End If Next ck .Close End With Set rs = Nothing conn.Close Set conn = Nothing
Page 1 of 1