MS Chart - Can't display anything! Help!

04-14-2004, 10:22 AM
I am wanting to display a bar chart and a pie chart.

Not sure if MSChart is the correct method for a pie chart but maybe someone can tell me?

I have an MSChart control on my page, which I have populated by the use of this code:

' NOTE: Have set a reference to the Microsoft ActiveX Data
' Objects 2.0 Library.
Private rsTask As New ADODB.Recordset
Private cn As New ADODB.Connection

Private Sub Form_Load()
Dim strQuery As String

cn.ConnectionString = _
"Provider=Microsoft.Jet.OLEDB.3.51;Data Source=" & _


strQuery = "SELECT TaskID, CustomerID" & _
"FROM Products WHERE CustomerID=1"

rsTask.Open strQuery, cn, adOpenKeyset

With MSChart1
.ShowLegend = True
Set .DataSource = rsTask
End With

End Sub

But I cannot get anything to display on it!

Can anyone please tell me what I am doing wrong ?
And also tell me how to get a pie chart?


04-14-2004, 01:13 PM
How do you go about assigning values to the axises etc. ?

All I want is a simple bar chart plotting 1 value against another.

Or a pie chart...

I've looked for some info on these things and MSChart, but it doesnt seem to be very well documented, and anything that is documented is not very obvious as to how to do it.

Can anyone please help?

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum