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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User defined type not defined 2

Status
Not open for further replies.

connollyg

Technical User
Dec 29, 2001
28
GB
If i try to use statements such as :-

DIM wks as workspace

or

DIM dbs as Database

within my VBA code in Access 2002, gives me "User defined type not defined" what gives?
 
What are you doing with those variables after you declare them? I would suspect that you are trying to use them in a way that is supported by DAO Library. Which since A2K ADO is the default Library. You need to check your references and see if you have a DAO library checked, if not check it. Now that you have it checked it's priority may be beneath that of the ADO so you would need to do this when you are defining your variable

Dim cdb As DAO.Database

Or you could set the DAO library priority to be higher that the ADO then you could The way you have already done.

HTH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top