I have posted this problem a couple of times over the last few years
but have been unable to find a solution that works. Sometimes charts
in reports will display showing the design data instead of the actual
query data the first time they are opened. If the report is closed and
reopened the correct data is shown. This seems to be a nasty Access
bug that has carried across the last few versions at least.
One post that I saw on the subject suggested that the issue was one of
timing and suggested adding the following to the report code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
On Error Resume Next
Call TestProc
End Sub
The called procedure is:
Function TestProc()
Dim i As Integer
For i = 1 To 15
DoEvents
Next i
End Function
Problem is, it doesn't actually work. This issue has risen its head on
several databases that I have written and I am still to see a solution
that works.
Any help or ideas would be greatly appreciated.