[AccessD] Unknown Jet Error

Doug Murphy dw-murphy at cox.net
Tue Jul 27 13:37:21 CDT 2010


Hello Chester,

Here is an example database showing how to work with charts in code.
http://www.augsd.org/sampleapps/Charting%20For%20Access.zip. It may not
address your specific need but the approach may give some insight on how to
reach your goals.

Doug

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester
Sent: Tuesday, July 27, 2010 10:44 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Unknown Jet Error

Yes I will agree it is a mess of code. I am by no means a professional
coder. Some of this came from an old form. It is only part of the code.

Anyway let me start from the beginning of the story

The form I am working with contains a chart that has hourly data points for
the last six days. The chart likes to auto scale the x axis for seven days .
The scale starts one day before the actual data.

My attempts to work with the chart were not successful so I thought I would
change the x axis scale of the chart using VBA. My plan was to retrieve the
minimum axis value and then change it. I am still unclear on how to retrieve
it.

The stop is temporarily in the code so when the form opens I can walk
through the code.

I have manipulated the graph axis in the past with code.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Hewson
Sent: Tuesday, July 27, 2010 11:53 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Unknown Jet Error

I'm not sure what you're trying to do.
Please explain what you are attempting to do.

To me, I don't know why you would put "Stop" at the beginning of the sub.
Stop suspends the code so it doesn't progress any further.  You then attempt
to open a different form, maximize the current form and set focus to an
object on the current form.  You then Dim several variables, then turn off
the warnings.

I would think that opening one form when you open a form would give you an
error message.
I also think you would probably get another error message when you attempt
to set focus on an object that is not on the second form.  I think the
maximize command is ineffective because it doesn't apply to the form that is
being opened, but the form you attempted to use it on has already lost its
focus, so it won't work there either.  None of the Dim variables have
anything to do, so they are taking up code space for no apparent reason.
The Warnings have been turned off, I wouldn't do that unless there are some
messages I don't want to see.  One example is an update query where I know
how many rows will be updated.

Just my musings, I would be interested in what you're trying to do and how
the second form relates to the first.


Jim


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester
Sent: Tuesday, July 27, 2010 11:17 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] Unknown Jet Error

Why does this code cause an error? Compact and repair is of no use.

Private Sub Form_Open(Cancel As Integer)
    Stop
    DoCmd.OpenForm "frm Plant Pressures Scatter"
    DoCmd.Maximize
    Me!chtPlantChart.SetFocus
    Dim frm As Form, ctl As Control
    Dim varItm As Variant, intCnt As Integer
    Dim MaxY1 As Single, MaxY2 As Single, MajorUnitY1 As Single
    Dim MinorUnitY1 As Single, MajorUnitY2 As Single, MinorUnitY2 As Single
    DoCmd.SetWarnings Off
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


--
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