UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Expected User-defined Type, Not Project, Any Version    
 
   
access2009eg
post Sep 10 2019, 10:06 AM
Post#1



Posts: 1,126
Joined: 19-February 08



Hello Friends

I copied all access object from old db to new db

while compiling the db

This error appear
Compile error:
Expected user-defined type, not project

despite the references is the same in the 2 db new and old

CODE
Dim db As Database

--------------------
I would like to Thank you for your help
Go to the top of the page
 
theDBguy
post Sep 10 2019, 10:10 AM
Post#2


Access Wiki and Forums Moderator
Posts: 76,396
Joined: 19-June 07
From: SunnySandyEggo


Hi. If you're using DAO code, try it this way:
CODE
Dim db As DAO.Database

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
access2009eg
post Sep 10 2019, 10:19 AM
Post#3



Posts: 1,126
Joined: 19-February 08



Hi theDBguy

Why this error appear

I compile the old db no error happiness

All reference is the same

--------------------
I would like to Thank you for your help
Go to the top of the page
 
arnelgp
post Sep 10 2019, 10:20 AM
Post#4



Posts: 1,473
Joined: 2-April 09
From: somewhere out there...


you have module or function/sub whose name is same as your db.

--------------------
Never stop learning, because life never stops teaching.
Go to the top of the page
 
access2009eg
post Sep 10 2019, 10:23 AM
Post#5



Posts: 1,126
Joined: 19-February 08



arnelgp


thumbup.gif


thanks.gif


wavehi.gif

--------------------
I would like to Thank you for your help
Go to the top of the page
 
access2009eg
post Sep 10 2019, 07:57 PM
Post#6



Posts: 1,126
Joined: 19-February 08



theDBguy

your code is work correctly but

just need to know the reason notworthy.gif

--------------------
I would like to Thank you for your help
Go to the top of the page
 
theDBguy
post Sep 11 2019, 07:13 AM
Post#7


Access Wiki and Forums Moderator
Posts: 76,396
Joined: 19-June 07
From: SunnySandyEggo


Hi. No worries. Glad to hear it’s all sorted out now. Good luck with your project.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    19th October 2019 - 09:37 AM