Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: Dim db as Database


Message #1 by "Elmer Espinosa" <elmerespinosa@y...> on Sat, 12 May 2001 03:02:07 +0800
Why is it that if make a new blank database, after creating the tables 

then I would like to make a SQL query I cant define my variable "db" as 

database??? Please hellp me!!!!!



Thanks in advance!!! =3D)

Message #2 by "Ryan J Schave" <ryan@e...> on Sat, 12 May 2001 08:12:56
> Why is it that if make a new blank database, after creating the tables 

> then I would like to make a SQL query I cant define my variable "db" as 

> database??? Please hellp me!!!!!

> 

> Thanks in advance!!! =3D)



It could be that you don't have a referecne to either DAO or ADO.



Make sure you're in the debug window or a code window.  Choose References 

from the Tools menu.  



Choose either Microsoft DAO 3.51 Object Library (mab be 3.61) or Microsoft 

ActiveX Data Objects 2.1 Libary (may be a different version).



Once you have a reference to either DAO or ADO you will be able to use 

define a varible as database.



dim db as Database

set db = CurrentDB



etc.



Hope this helps.



Ryan

  Return to Index