[AccessD] Code stops working

Gustav Brock Gustav at cactus.dk
Tue Apr 4 12:53:13 CDT 2006


Hi Charlotte

Have you tried with

If Not (rst.EOF = True And rst.BOF = True) Then

Also, I know this construction is widely used, but I've never seen it necessary to check for BOF when opening a recordset, only when you possibly step up beyond record 1.

/gustav

>>> cfoust at infostatsystems.com 04-04-2006 19:10:13 >>>
Has anyone else seen this?  We have code that has worked for 3 years and
suddenly, it fails.  The code can be very simple like "If Not (rst.EOF
and rst.BOF) Then"  and even though both EOF and BOF evaluate to true,
the next line of code will execute!  I've seen this in several places.
And we have signature handling in one of our apps.  The subforms, which
all have the same kind of code, raise a custom event which is sunk by
the parent.  On some subforms, the event may raise the first time but
not after that.  Making a change in the code in either the child or
parent might make it work ... Once.  Then it returns to ignoring the
raise event line.  It steps through it, but the event is never sunk in
the parent form.  The exact same code works in other subforms.  I've
tried compact and repair, decompile, creating a new form and copying the
controls over, then exporting the code from the odd subform to text and
pasting it into the module for the new form.  Same behavior.  These are
very complex subforms and the parent form is worse.  

I just recently upgraded to Office 2003 on my machine (we're still using
Access 2002) and I'm wondering if that has caused the strange behavior.
The others in my office have had 2003 for a while, but I dragged my
heels on it.  We're also working in VS 2005 and have the latest source
safe version, so it may be an ugly combination of things, but has anyone
else had a similar experience?  Code that worked on Friday was broken on
Monday!  Yikes!

Charlotte Foust
Infostat Systems, Inc.





More information about the AccessD mailing list