Compile Error

I open up an access database and before allowing to do anything it straight away reads:

compile error:
sub or function not defined.

where can you go to place the tick out of the box for this to go away and for the database to open up in peace, i think that's what the problem may be but am looking for help.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rey Obrero (Capricorn1)Commented:
try holding the shift key while opening the db.

see if the db will open and show the db object window.

click a form and click design.

then View>Code

in the vba window  


take not of the error that will show and post it here or try to correct.

good luck...
Rey Obrero (Capricorn1)Commented:
if the forms design view are not enabled ..
then, the db you are using is in mde format and cannot be modified.

you have to use the mdb version if it is available if it is not then you cannot do anything with the problem

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
GanaSonaDaAuthor Commented:
Sorry that was for an older database, my error is: compile error:
can't find project or library.
I have made myself an administrator of this app and it says when i click o.k. that i do not have access when selecting design mode.
this is bizzare as last time i removed some ticks where missing and the like are. need to know how to a) get back there and check b) what ticks are in place or should be in place if not any of them should be removed?
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

Hi GanaSonaDa

I think some of your References are MISSING
go to code (VBA) then menu bar > tools > references and uncheck all those checkboxes which say MISSING,

make a new mdb, then import everything from the old mdb.

Hi Rey, long time no see :o)

You should transfer the old DB to new version, and then do the compile.

Best Regards

Alan WarrenApplications DeveloperCommented:

You should be able to create a New Module, Module1
Then on the Debug Menu > Compile 'Your.mdb'

This will invoke the VBA compiler, which should Highlight the offending line/lines of code.

The 'sub or function not defined' error is usually raised when the sub or function being invoked  is  outside the scope of current procedure, you may be able to fix this by locating the sub or function and importing it into the current form code library. Alternatively if you need to reference this sub or or function from multiple  forms you can make the sub or function global by moving it to a New Module.

The  other thing to check for is the Form's 'hasModule' property.

Alan ":0)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.