Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSChart + ADODB.Recordset only displays 1 of 8 rows

Status
Not open for further replies.

Kavius

Programmer
Apr 11, 2002
322
CA
I have a recordset (SampleData) and a chart (MSChart1). When I bind the data to the chart it only displays the first row of data (there are 8 rows in the recordset).

I have no idea beyond that what could be happening. Any ideas?
Code:
'*** UserControl_Initialize ****************************************************
'* Initialize the data that is about to be displayed.
'*******************************************************************************
Private Sub UserControl_Initialize()
  Set SampleData = CreateDataset
  
  With MSChart1
    .Legend.Location.LocationType = VtChLocationTypeBottom
    .RandomFill = False
    .Repaint = True
    
    Set .DataSource = SampleData
  End With
  
End Sub
'*** UserControl_Initialize ****************************************************


'*** UserControl_Terminate ****************************************************
'* Clean up the data we created.
'******************************************************************************
Private Sub UserControl_Terminate()
  If Not (SampleData Is Nothing) Then
    If (SampleData.State <> ADODB.adStateClosed) Then
      SampleData.Close
    End If
    Set SampleData = Nothing
  End If
End Sub
'*** UserControl_Terminate ****************************************************
 
So I have ended up not using mschart (that piece of garbage) and just wrote my own. It's ugly (not very automated), but works very well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top