error 91 Object Variable o on with block variable is not set 
Author Message
 error 91 Object Variable o on with block variable is not set

Hi Pablo,

you have to select the "Microsoft DAO 3.51 Object Library" in the
"Project -> References"-menu if you are working with an Access97 database.
If the database is an Access 2000 database then you have to select the
"Microsoft DAO 3.6 Object Library".
You can check the appeareance of a library in the following way:
Set the cursor within the command (OpenRecordset) -> press the F1-key. If
the help system doesn't find the keyword (here "OpenRecordset") you have to
ckeck the items above. Otherwise it could be a version conflict.

Josef



Quote:
> I ' m having a message error number 91, "Object variable or
> with block variable is not set", when I try to open an
> Access (mdb) database from a Visual Basic 6.0 application.

> This happens in a windows NT workstation environment that
> does not have MSACCESS installed,but It has installed MDAC .

> My code is :
> (In general declarations)
> Public mydatabase as database

> Sub openmydatabase

> Set mydatabase = OpenDatabase("base1.mdb",  _
>  false, false, "; pwd=" mydatabasepassword)

> end sub

> Please somebody can help me??

> Thank you!!

> * Sent from AltaVista http://www.*-*-*.com/ Where you can also find

related Web Pages, Images, Audios, Videos, News, and Shopping.  Smart is
Beautiful


Sun, 01 Dec 2002 03:00:00 GMT  
 error 91 Object Variable o on with block variable is not set
It sounds as if you aren't setting your recordset
    set rs = whatever 'DAO Or ADO
Post some code

Quote:
> Hi Pablo,

> you have to select the "Microsoft DAO 3.51 Object Library" in the
> "Project -> References"-menu if you are working with an Access97 database.
> If the database is an Access 2000 database then you have to select the
> "Microsoft DAO 3.6 Object Library".
> You can check the appeareance of a library in the following way:
> Set the cursor within the command (OpenRecordset) -> press the F1-key. If
> the help system doesn't find the keyword (here "OpenRecordset") you have
to
> ckeck the items above. Otherwise it could be a version conflict.

> Josef



> > I ' m having a message error number 91, "Object variable or
> > with block variable is not set", when I try to open an
> > Access (mdb) database from a Visual Basic 6.0 application.

> > This happens in a windows NT workstation environment that
> > does not have MSACCESS installed,but It has installed MDAC .

> > My code is :
> > (In general declarations)
> > Public mydatabase as database

> > Sub openmydatabase

> > Set mydatabase = OpenDatabase("base1.mdb",  _
> >  false, false, "; pwd=" mydatabasepassword)

> > end sub

> > Please somebody can help me??

> > Thank you!!

> > * Sent from AltaVista http://www.altavista.com Where you can also find
> related Web Pages, Images, Audios, Videos, News, and Shopping.  Smart is
> Beautiful



Wed, 04 Dec 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Object variable or With block variable not set (Error 91)

2. Runtime error 91/Object variable or With block variable not set problems

3. runtime error: 91 Object variable or with block variable not set

4. Object variable or With block variable not set (Error 91) Please Help

5. Run Time Error 91: Object variable or With Block variable not set

6. VB 5.0 - Error:91 Object Variable Or With Block Variable Not Set

7. Object variable or With block variable not set (Error 91)

8. Error 91 Object variable or With-Block, variable not set

9. Error 91-Object or block with variable not set

10. error 91 - object or block with variable not set

11. Debugging COM+ Componets -- Runtime error 91- Object variable or with block not set

12. Error 91 - object or block width variable not set

 

 
Powered by phpBB® Forum Software