Access 97 -> Access 2000 VB Scope Problem 
Author Message
 Access 97 -> Access 2000 VB Scope Problem

Converting Access 97 to Access 2000 with DAO and VB.

I have an .mdb with VB code called by a form using DAO objects located
in the same .mdb.  There are also several functions in modules.  When
the code  (from the form) calls one of the funtions (in a module), the
DAO object references are lost upon the return from the funtion. Error:
"Object invalid or no longer set." is returned at the next object
reference.  All this code ran fine under Access 97.  SR1a is installed.

Anybody experienced this or know how to fix it?

L Baker
MVS, Ltd.



Sat, 26 Apr 2003 03:00:00 GMT  
 Access 97 -> Access 2000 VB Scope Problem
It is possible you are closing something you didn't open, such as
the default workspace? This can cause references to go out of scope.

Quote:

> Converting Access 97 to Access 2000 with DAO and VB.

> I have an .mdb with VB code called by a form using DAO objects located
> in the same .mdb.  There are also several functions in modules.  When
> the code  (from the form) calls one of the funtions (in a module), the
> DAO object references are lost upon the return from the funtion. Error:
> "Object invalid or no longer set." is returned at the next object
> reference.  All this code ran fine under Access 97.  SR1a is installed.

--
Perth, Western Australia
Tips for MS Access users at:
        http://odyssey.apana.org.au/~abrowne


Sat, 26 Apr 2003 03:00:00 GMT  
 Access 97 -> Access 2000 VB Scope Problem

That was the problem. Apparently Access 97 must treat scope of objects
differently than Access 2000.  Thanks for the help.  You don't happen to know
how to get around the other problem regarding the default library References
I posted do you?

Quote:

> It is possible you are closing something you didn't open, such as
> the default workspace? This can cause references to go out of scope.


> > Converting Access 97 to Access 2000 with DAO and VB.

> > I have an .mdb with VB code called by a form using DAO objects located
> > in the same .mdb.  There are also several functions in modules.  When
> > the code  (from the form) calls one of the funtions (in a module), the
> > DAO object references are lost upon the return from the funtion. Error:
> > "Object invalid or no longer set." is returned at the next object
> > reference.  All this code ran fine under Access 97.  SR1a is installed.

> --
> Perth, Western Australia
> Tips for MS Access users at:
>         http://odyssey.apana.org.au/~abrowne



Sat, 26 Apr 2003 03:00:00 GMT  
 Access 97 -> Access 2000 VB Scope Problem
Set the default MS ADO in MS Access 2000 to MS DAO object library 2.5/3.0.

Quote:
> Converting Access 97 to Access 2000 with DAO and VB.

> I have an .mdb with VB code called by a form using DAO objects located
> in the same .mdb.  There are also several functions in modules.  When
> the code  (from the form) calls one of the funtions (in a module), the
> DAO object references are lost upon the return from the funtion. Error:
> "Object invalid or no longer set." is returned at the next object
> reference.  All this code ran fine under Access 97.  SR1a is installed.

> Anybody experienced this or know how to fix it?

> L Baker
> MVS, Ltd.



Fri, 09 May 2003 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. vba access 97 -> access 2000

2. Access 97 ---> Access 2000 migration

3. VBA OpenDatabase: Access 97 <-> Access 2000

4. access 97 -> access 2000

5. Access 97 to Access 2000 Problem

6. Creating new Access 97 database by VB code in Access 2000 module

7. Use VB to Detect Access 97 or Access 2000

8. Access 97 upgrade to Access 2000 or Access 2002

9. ACCESS 97->2000: exclusive open??

10. ADO: Convert Access 97 -> 2000

11. Access 97->2000 HELP PLZ.

12. Access 97->2000 HELP PLZ.

 

 
Powered by phpBB® Forum Software