Results 1 to 3 of 3

Thread: binding(?) MSChart to recordset

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2007
    Posts
    234

    binding(?) MSChart to recordset

    here is "my" code i coped from examples
    Code:
    Option Explicit
    Private rs As ADODB.Recordset
    Private objSource As MySource
    Private objBindingCollection As BindingCollection
    
    Private Sub Class_GetDataMember(DataMember As String, Data As Object)
       Set Data = rs
    End Sub
    
    Private Sub Class_Initialize()
        Dim thick As Single, trans As Single
        Dim i As Integer
        Dim FP As Variant
        ReDim FP(1 To 2)
        Set rs = New ADODB.Recordset
        With rs
            .Fields.Append "Thickness", adSingle
            .Fields.Append "Transmission", adSingle
            .CursorType = adOpenStatic
            .LockType = adLockOptimistic
            .Open
        End With
       For i = 1 To 100
                With rs
                   .AddNew
                   .Fields.Item("Thickness") = i
                   FP(1) = 1.68
                   FP(2) = i
                   .Fields.Item("Transmission") = Rpc(5000, 1.52, 1, FP)
                   .Update
                End With
       Next i
       rs.MoveFirst
    End Sub
    this makes MySource.cls that i copied from http://msdn2.microsoft.com/en-us/lib...35(VS.60).aspx

    how do I get this rs to be displayed in an MSChart like this: MSChart.DataSource = rs
    ???

    i know nothing...all i'm asking for is a tip or a pointer that will let me bind this stuff together to work. thanks for any help

    i'm guessing there is a difference between a Recordset and a Connection...but how to use one inplace of another i have no clue...
    Last edited by unxzst; Mar 26th, 2008 at 03:31 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width