cannot declare databse

  • Thread starter Thread starter Prameela
  • Start date Start date
P

Prameela

I neet to declare and refer the current database in my VBA
code. When I declare
"Dim dbs As Database"
It doesn't work. Could someone tell me what i am doing
wrong? I am new to VBA programming.

Thanks in advance
Prameela
 
Check the References. These are found in the Visual Basic
Editor under Tools->References. You will need the
Microsoft DAO 3.6 Object Library checked.

Hope This Helps
Gerald Stanley MCSD
 
And you should explicitly refer to either DAO or ADO:

Dim dbs As DAO.Database

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
 
Prameela said:
I neet to declare and refer the current database in my VBA
code. When I declare
"Dim dbs As Database"
It doesn't work. Could someone tell me what i am doing
wrong? I am new to VBA programming.

Thanks in advance
Prameela
You are missing a reference to the DAO Lib's.
Open a standard module, go to tools/references and check for "Missing
Reference".
Check or uncheck them, then clikc OK and close the form.

Ron
 
Back
Top