Kaup, Chester
Chester_Kaup at kindermorgan.com
Thu Oct 21 10:10:58 CDT 2010
I have the following code that runs when I click a button on a form. When I step though the code I get an unknown jet error message at the DoCmd.Close line. I have no idea what to look for. Thanks for any help. Private Sub OpenPlantPressuresForm_Click() On Error GoTo Err_OpenPlantPressuresForm_Click Dim stDocName As String Dim stLinkCriteria As String stDocName = "frm Plant Pressures Scatter" Stop DoCmd.OpenForm stDocName, , , stLinkCriteria DoCmd.Close acForm, stDocName DoCmd.OpenForm stDocName, , , stLinkCriteria Exit_OpenPlantPressuresForm_Click: Exit Sub Err_OpenPlantPressuresForm_Click: MsgBox Err.Description Resume Exit_OpenPlantPressuresForm_Click End Sub When the form opens the following code runs the is attached to the on enter event of the chart on the form. 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.