Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


MS Chart -- help


MS Chart -- help

Author
Message
Hal
Hal
Forum God
Forum God (1.1K reputation)Forum God (1.1K reputation)Forum God (1.1K reputation)Forum God (1.1K reputation)Forum God (1.1K reputation)Forum God (1.1K reputation)Forum God (1.1K reputation)Forum God (1.1K reputation)Forum God (1.1K reputation)

Group: Forum Members
Posts: 5, Visits: 44

Hello

I’ve been beating my head against the wall trying to get this MS Chart control to work with my VB 6 and Access 2k and ADO. It just shows the chart but with default values not what I have in my Access db.

 

I have my db set up like

Year     MS            Sun            Oracle    Linux

2000    100            200            300         450

2001    200            250            325        500

2002    150            350            425        375

2003    225            400            325        500

2004    275            500            425        475

 

and code…

 

‘ bas module

Option Explicit

Public cn As New ADODB.Connection

Public rs As New ADODB.Recordset

 

'Make Database Connection

Public Sub main()

    Dim path As String

    path = App.path & "\myChart.mdb"

    cn.ConnectionString = "provider=Microsoft.Jet.OLEDB.4.00;data source=" & path & ";"

    cn.Open

    If cn.State = adStateClosed Then

        MsgBox "Connection Error", vbCritical, "Error!"

        End

    Else

        Debug.Print "Connection Object Created"

        cn.CursorLocation = adUseClient

    End If

   

    'Setting Initial data for recordset

    rs.Open "Select * from tblCategory", cn, adOpenDynamic, adLockOptimistic

    Debug.Print "Recordset Object Created"

   

    Call Form1.Show

End Sub

 

‘ standard form

Private Sub Form_Load()

    MSChart1.ShowLegend = True

    MSChart1.Title = "Companies Past Years Results"

    Set MSChart1.DataSource = rs

    MSChart1.Refresh

End Sub

 

kudos to anyone solving this

 

Hal


TallOne
TallOne
Forum God
Forum God (50K reputation)Forum God (50K reputation)Forum God (50K reputation)Forum God (50K reputation)Forum God (50K reputation)Forum God (50K reputation)Forum God (50K reputation)Forum God (50K reputation)Forum God (50K reputation)

Group: Forum Members
Posts: 370, Visits: 212

Hi Hal!

Here's a post that MAY help.  I won't guarantee anything LOL!

http://www.a1vbcode.com/vbforums/shwmessage.aspx?forumid=3&messageid=5063#bm5079

 

Later



TallOne
Alexa
Alexa
Forum God
Forum God (1K reputation)Forum God (1K reputation)Forum God (1K reputation)Forum God (1K reputation)Forum God (1K reputation)Forum God (1K reputation)Forum God (1K reputation)Forum God (1K reputation)Forum God (1K reputation)

Group: Forum Members
Posts: 3, Visits: 5
Hi,
I tried this control for several weeks now and I am looking at third party COM Charting tools I could use for our intranet. Any ideas?
Thanks!
GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search