By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,466 Members | 1,756 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,466 IT Pros & Developers. It's quick & easy.

Error on defining DAO objects in the access VBA

P: n/a
Why I am not be able to define following objects:

Dim wrkDefault As Workspace
Dim dbsNew As database
Dim prpLoop As Property
I am getting in VBA "Compile error: User defined type not defined".
Still I can use DAO functions, but without making pointers for
objects. What could be wrong?

Ivars
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
It sounds like you simply don't have the reference set for DAO. In Access
2000 and above, the reference is not set up by default in new projects. YOu
have to add it under Tools -> References from the VB IDE. Also, you really
should get in the habit of fully qualifying the type names in case ADO is also
present, even though ADO does not have Database and Workspace classes.

Dim wrkDefault As DAO.Workspace
Dim dbsNew As DAO.Database
Dim prpLoop As DAO.Property
On 15 Dec 2004 07:55:23 -0800, al********@inbox.lv (alpha_male) wrote:
Why I am not be able to define following objects:

Dim wrkDefault As Workspace
Dim dbsNew As database
Dim prpLoop As Property
I am getting in VBA "Compile error: User defined type not defined".
Still I can use DAO functions, but without making pointers for
objects. What could be wrong?

Ivars


Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.