[AccessD] Chart does not refresh

Jim Lawrence accessd at shaw.ca
Tue Aug 17 13:58:28 CDT 2010


Hi Chester:

Without testing I would try the 'load' event... that event takes place when
all the primary objects have been loaded and then allows you to run any
function or subroutines. You can also use the 'open' event but that can be
too early (before 'load') or the 'activate' event but that event requires
focus but runs after the 'load' event.   

HTH
Jim



-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester
Sent: Tuesday, August 17, 2010 5:48 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] Chart does not refresh

I run the following code on the enter event of a chart on a form. The first
time I open the form the chart is on nothing happens. I then close the form
and reopen it. Then the code works as intended. Do I maybe need to put the
code on a different event or on a form event rather than a chart event?

Private Sub chtPlantChart_Enter()
    Dim GraphApp As Graph.Application
    Dim GraphObj As Graph.Chart
    Dim XMin As Single

    Set GraphObj = Me!chtPlantChart.Object
    
    GraphObj.Axes(1).MinimumScaleIsAuto = True
    XMin = GraphObj.Axes(1).MinimumScale
    GraphObj.Axes(1).MinimumScale = XMin + 1
    
    Me!chtPlantChart.SetFocus
    GraphObj.Application.Update
    Me.Repaint
End Sub

Chester Kaup
Engineering Technician
Kinder Morgan CO2 Company, LLP
Office (432) 688-3797
FAX (432) 688-3799

 
No trees were killed in the sending of this message. However a large number
of electrons were terribly inconvenienced.


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com





More information about the AccessD mailing list