From: igg via AccessMonster.com on
i have a module that loops thru number of lines, parses them and updates or
inserts into tables.
for k = 0 to Ubound(Lines)
if ..
currentdb.excute "Update ..."
elseif ..
currentdb.excute "insert ..."
next k
if i replace the Ubound(Lines) with 1 or 2, after the for loop is finished i
get the "Object Invalid or no longer set" error.

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/201003/1

From: John Spencer on
I don't see anything in the posted code that would cause that. It would help
if you posted the actual code and not something you have typed into the
message window.

For instance, it is CurrentDB.EXECUTE not CurrentDB.excute.

Also, it helps if you can tell us the exact line where the error occurs.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

igg via AccessMonster.com wrote:
> i have a module that loops thru number of lines, parses them and updates or
> inserts into tables.
> for k = 0 to Ubound(Lines)
> if ..
> currentdb.excute "Update ..."
> elseif ..
> currentdb.excute "insert ..."
> next k
> if i replace the Ubound(Lines) with 1 or 2, after the for loop is finished i
> get the "Object Invalid or no longer set" error.
>
From: igg via AccessMonster.com on
i use dcount and dmax and they are slow. any simple custom module to speed up
the search for count and max. i tried some online custom functions which are
really good but in my case they cause crashes. Some codes or ideas that an
give me better understanding.


John Spencer wrote:
>I don't see anything in the posted code that would cause that. It would help
>if you posted the actual code and not something you have typed into the
>message window.
>
>For instance, it is CurrentDB.EXECUTE not CurrentDB.excute.
>
>Also, it helps if you can tell us the exact line where the error occurs.
>
>John Spencer
>Access MVP 2002-2005, 2007-2010
>The Hilltop Institute
>University of Maryland Baltimore County
>
>> i have a module that loops thru number of lines, parses them and updates or
>> inserts into tables.
>[quoted text clipped - 6 lines]
>> if i replace the Ubound(Lines) with 1 or 2, after the for loop is finished i
>> get the "Object Invalid or no longer set" error.

--
Message posted via http://www.accessmonster.com