[AccessD] Unknown Jet Error

Kaup, Chester Chester_Kaup at kindermorgan.com
Thu Oct 21 13:32:10 CDT 2010


Looks like stLinkCriteria needs to go away. 
The Stop is for testing purposes only
The form is opened closed and opened again because all other attempts to refresh, repaint etc the chart fail to do it.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jack drawbridge
Sent: Thursday, October 21, 2010 12:54 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Unknown Jet Error

Chester,

Where does stLinkCriteria get its value? Doesn't seem to be initialized to
me. What's the purpose of the Stop command?
Also why are you opening
DoCmd.OpenForm stDocName, , , stLinkCriteria  twice?

Just my 2 cents.
Jack

On Thu, Oct 21, 2010 at 11:10 AM, Kaup, Chester <
Chester_Kaup at kindermorgan.com> wrote:

> 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.
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
-- 
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