
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