2 Replies - 1721 Views - Last Post: 31 January 2013 - 11:40 PM Rate Topic: -----

#1 Jovel Mark  Icon User is offline

  • D.I.C Head

Reputation: -3
  • View blog
  • Posts: 81
  • Joined: 22-November 11

Inner Join in VB 6.0

Posted 19 January 2013 - 04:54 AM

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

Is This A Good Question/Topic? 0
  • +

Replies To: Inner Join in VB 6.0

#2 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3459
  • View blog
  • Posts: 11,717
  • Joined: 12-December 12

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

Was This Post Helpful? 0
  • +
  • -

#3 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 574
  • View blog
  • Posts: 2,989
  • Joined: 19-May 09

Re: Inner Join in VB 6.0

Posted 31 January 2013 - 11:40 PM

To answer your question: of course it's possible.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1