Object Variable not set

Object Variable not set

am 11.06.2008 15:33:23 von Kevin Harrison

------_=_NextPart_001_01C8CBC7.B8A35C84
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

=20

I am using a MyODBC application database with a front end, which was deve=
loped by a previous user at my organisation, who has since left.

=20

It is using drop downs, within a form to set a date parameter for an impo=
rt procedure.

=20

There is one drop down for month and another for year.

=20

When I use this form for all months upto and including April 2008, it is =
functioning correctly, when I try to use this form for May 2008 however, =
I am getting an error:

=20

'Object variable Not set'.

=20

I have seen this error before in VBA databases, and I am guessing this is=
=20due to this variable not being declared somewhere in the set up code.

=20

However, as I am unfamiliar with MyODBC, I am unsure where I should be lo=
oking to correct this. Can you help at all?

=20

Kind Regards,

Kev Harrison

Senior Commissions Consultant

!"§§=A7Mobile=3D

*: + 44 (0)1707 312835

* kevin.harrison@t-mobile.co.uk =20

=20


T-Mobile (UK) Limited
Company Registered Number: 02382161
Registered Office Address: Hatfield Business Park, Hatfield, Hertfordshir=
e, AL10 9BW
Registered in England and Wales
=20
NOTICE AND DISCLAIMER
=20
This email (including attachments) is confidential. If you are not the in=
tended recipient, notify the sender immediately, delete this email from y=
our system and do not disclose or use for any purpose.

------_=_NextPart_001_01C8CBC7.B8A35C84--

RE: Object Variable not set

am 11.06.2008 16:27:26 von Al McNicoll

Dear Kev,

That sounds like a straight VBA error - the only way I could see it =
being
linked to MyODBC would be if MyODBC was returning an unusual value which =
led
to VBA running a different branch of code - can you post the code which
gives you the error? I imagine it might be something like
myCombo_AfterUpdate.

The VBA error means that an object variable (ie not just a string / =
number,
but an ADO connection or a comboBox control or something like that) is =
set
to Nothing, or that the code which assigns it is missing "Set" before =
the
line.

EITHER

Dim myRecordset As ADODB.Recordset
myRecordset.Open("SELECT 1",adStatic) ' This recordset is still =
"Nothing"

OR

myRecordset =3D myCon.Execute("SELECT 1") ' This statement is missing =
the
initial "Set"
should read:
Set myRecordset =3D myCon.Execute("SELECT 1")


Hope that helps - if it is a VBA error, feel free to email me rather =
than
posting to the board.

Kind regards,

Al McNicoll
Integritec Limited


-----Original Message-----
From: Kevin Harrison [mailto:Kevin.Harrison@t-mobile.co.uk]=20
Sent: 11 June 2008 14:33
To: myodbc@lists.mysql.com
Subject: Object Variable not set

Hi,

=20

I am using a MyODBC application database with a front end, which was
developed by a previous user at my organisation, who has since left.

=20

It is using drop downs, within a form to set a date parameter for an =
import
procedure.

=20

There is one drop down for month and another for year.

=20

When I use this form for all months upto and including April 2008, it is
functioning correctly, when I try to use this form for May 2008 however, =
I
am getting an error:

=20

'Object variable Not set'.

=20

I have seen this error before in VBA databases, and I am guessing this =
is
due to this variable not being declared somewhere in the set up code.

=20

However, as I am unfamiliar with MyODBC, I am unsure where I should be
looking to correct this. Can you help at all?

=20

Kind Regards,

Kev Harrison

Senior Commissions Consultant

!"§§=A7Mobile=3D

*: + 44 (0)1707 312835

* kevin.harrison@t-mobile.co.uk =20

=20


T-Mobile (UK) Limited
Company Registered Number: 02382161
Registered Office Address: Hatfield Business Park, Hatfield, =
Hertfordshire,
AL10 9BW
Registered in England and Wales
=20
NOTICE AND DISCLAIMER
=20
This email (including attachments) is confidential. If you are not the
intended recipient, notify the sender immediately, delete this email =
from
your system and do not disclose or use for any purpose.


--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=3Dgcdmo-myodbc@m.gmane.o rg

RE: Object Variable not set

am 12.06.2008 00:48:58 von John.Bonnett

I would suspect it is nothing to do with MySQL or MyODBC. It is most =
likely an error in your VBA code. You have an object reference variable =
which does not point to an object and you tried to use one of its =
methods or properties.

John Bonnett=20

-----Original Message-----
From: Kevin Harrison [mailto:Kevin.Harrison@t-mobile.co.uk]=20
Sent: Wednesday, 11 June 2008 11:03 PM
To: myodbc@lists.mysql.com
Subject: Object Variable not set

Hi,

=20

I am using a MyODBC application database with a front end, which was =
developed by a previous user at my organisation, who has since left.

=20

It is using drop downs, within a form to set a date parameter for an =
import procedure.

=20

There is one drop down for month and another for year.

=20

When I use this form for all months upto and including April 2008, it is =
functioning correctly, when I try to use this form for May 2008 however, =
I am getting an error:

=20

'Object variable Not set'.

=20

I have seen this error before in VBA databases, and I am guessing this =
is due to this variable not being declared somewhere in the set up code.

=20

However, as I am unfamiliar with MyODBC, I am unsure where I should be =
looking to correct this. Can you help at all?

=20

Kind Regards,

Kev Harrison

Senior Commissions Consultant

!"§§=A7Mobile=3D

*: + 44 (0)1707 312835

* kevin.harrison@t-mobile.co.uk =20

=20


T-Mobile (UK) Limited
Company Registered Number: 02382161
Registered Office Address: Hatfield Business Park, Hatfield, =
Hertfordshire, AL10 9BW Registered in England and Wales
=20
NOTICE AND DISCLAIMER
=20
This email (including attachments) is confidential. If you are not the =
intended recipient, notify the sender immediately, delete this email =
from your system and do not disclose or use for any purpose.

--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=3Dgcdmo-myodbc@m.gmane.o rg