Declare Variable

Haytham

Registered User.
Local time
Today, 01:41
Joined
Jun 27, 2001
Messages
162
Hi All...
In the form code, I tried to declare a variable as follows:

Public db As Database
Public rst As Recordset
etc..

When I execute my code, it gives me error message that :
db As Database = Undefined Data Type

I built previous dbs with such code without any problem
Any help please
 
I'm not sure if this is it, but ...

If you're using Access 2000, you'll get an error message when you try to declare a variable of type Database or Recordset, even though such declarations were perfectly legal (in some cases necessary) in Access 97.

I got around this "feature" of A2K by simply declaring both variables without any type:

<< Dim db, rst >>

Hope this helps.

[This message has been edited by AlanS (edited 11-20-2001).]
 
Thank you Alans, I'm really using Access 2K.
This problem occur now only and not in Access 97.
I had to check the reference for the missing library, and I found it. It's DAO 3.6
Again thank you
 

Users who are viewing this thread

Back
Top Bottom