Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database Type Declaration

Status
Not open for further replies.

JHeimall

MIS
Nov 8, 2002
14
US
I am having trouble declaring a variable as a Database Object. I can go into other databases I have created and it will declare perfectly fine. Is there a library I need to include?

Code:
Dim db As Database  'This is how I have it
Set db = CurrentDB

'...

db.Execute strSQL

I have also tried to declare it as a variant but no luck there either. Any help would be great.
 
Hi!

If you are using A2k then ADO is the default object library and the ADO database object can't be set to CurrentDb. What you want to do is set a reference to DAO (Data Access Object) 3.6 library and then say Dim db As DAO.Database.

hth
Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top