XY Chart - now you see it.....now you don't

rich.barry

Registered User.
Local time
Today, 11:37
Joined
Aug 19, 2001
Messages
176
I have an on-going problem with XY charts that have been inserted into forms "losing" their formatting.

Generally, the charts Row Source is a table that is populated using code. Sometimes this table may be blank, but I'm not sure if this is part of the problem or not.

What seems to happen is the X axis loses it's scale and nothing gets plotted correctly. The form never prompts for a "save changes" when closing, so it does not seem that any of the chart properties have changed. Looking through all the properties revels nothing standing out as incorrect.

Pasting a new copy of my back up chart onto the form puts things back to normal until next time.

I smell an Access bug. Has anyone else had similar problems and have any resolution?

Thanks

Richard
 
I had a LOT of problems with chart but I was able to resolve all of them... Are you using Microsoft Chart or Excel to build your charts? Which version of Access are you working with? If you do have code, can you put it so I can have a look at it? I have many questions but no answer for now but I doubt it is due to an Access bug... Sorry...
 
I'm running Access 2000 with SR1.
I use Insert Chart from the menu's which gives me a chart with OLE Class: Microsoft Graph 2000 Chart, Class: MSGraph.Chart.8.

On this, I set the Row Source to a fairly simple Select statement:
SELECT tblReDry.EBayDate, tblReDry.ReDry FROM tblReDry ORDER BY tblReDry.EBayDate;

The table is populated by some code which updates the table and re-queries the graph:

Private Sub calReDry_Click()

Dim db As ADODB.Connection
Set db = CurrentProject.Connection

Dim Record As New ADODB.Recordset
Dim AddArray(5000) As Date
Dim LastTime As Date
Dim c As Integer
Dim l As Integer

lblDateFrom.Caption = CSng(Int(calReDry.Value) + 0.25)
lblDateTo.Caption = CSng(Int(calReDry.Value) + 1.25)

c = 0

'Clear Data Tables
DoCmd.SetWarnings False
DoCmd.OpenQuery "mqryReDry"
DoCmd.SetWarnings True

Record.Open "SELECT * FROM tblRedry ORDER BY EBayDate", db, adOpenKeyset, adLockOptimistic
If Record.RecordCount > 0 Then
Record.MoveFirst
LastTime = Record!EBayDate
Record.MoveNext

Do While Not Record.EOF
'if data hasn't written to file for 3 minutes, then insert a blank
If Record!EBayDate > LastTime + 3 / 1440 Then
c = c + 1
AddArray(c) = LastTime + 2 / 1440
End If
LastTime = Record!EBayDate
Record.MoveNext
Loop

If c + 0 Then
For l = 1 To c
With Record
.AddNew
!EBayDate = AddArray(l)
.Update
End With
Next l
End If
End If
Record.Close

Forms!frmReDry!gphReDry.Requery

End Sub



Regards

Richard
 

Users who are viewing this thread

Back
Top Bottom