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
> Dim Dbs As Database Problem, Access 2016    
 
   
johnpdmccall
post Jan 12 2018, 07:54 AM
Post#1



Posts: 1,707
Joined: 14-March 00
From: Scotland


Hi Folks

I'm debugging and getting the error "Expected user defined type not project" and it highlights this part of my code
CODE
dbs as Database
the full line is
CODE
Dim dbs As Database
.

I'm using the same line lots throughout my database.

It's not happening when I debug another old database which the same code and references but I can't find what's missing. All references are ok.
Any ideas where I should be looking?
This post has been edited by johnpdmccall: Jan 12 2018, 07:55 AM

--------------------
Cheers,
John
Go to the top of the page
 
theDBguy
post Jan 12 2018, 08:08 AM
Post#2


Access Wiki and Forums Moderator
Posts: 71,395
Joined: 19-June 07
From: SunnySandyEggo


Hi John,

What is the name of your project?

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 
johnpdmccall
post Jan 12 2018, 08:13 AM
Post#3



Posts: 1,707
Joined: 14-March 00
From: Scotland


Ha! You were so right! - Yes my project was named "Database" blush.gif notworthy.gif

--------------------
Cheers,
John
Go to the top of the page
 
theDBguy
post Jan 12 2018, 08:17 AM
Post#4


Access Wiki and Forums Moderator
Posts: 71,395
Joined: 19-June 07
From: SunnySandyEggo


Glad to hear you got it sorted out. Cheers!

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 
GroverParkGeorge
post Jan 12 2018, 08:28 AM
Post#5


UA Admin
Posts: 31,561
Joined: 20-June 02
From: Newcastle, WA


This highlights two issues.

First, we need to keep Reserved Names in Access in mind when assigning names within our databases.

Second, fully qualified references are very important.

Dim dbs as DAO.Database


--------------------
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    16th January 2018 - 12:44 PM