VBA - IsLoaded() - Compile Error

  • Thread starter Thread starter SWalker
  • Start date Start date
S

SWalker

I have a form in which I use the "IsLoaded()" function and recieve "Compile
error: Sub or Function not defined."

Here's what I'm doing.

I've developed a new database which I modeled from an existing, working
database. In the working database one of the forms "Form Open" event
implements the IsLoaded("Form-Name") and runs fine.

Problem is in the new database. Same scenario, one of the new forms uses
IsLoaded("New-Form-Name") and fails.


I've checked the references and added to the new all the same references
reffered to in the existing module. Nothing unusual there.

So I thought the error might occur due to having a form and table with the
same name (I know, that should be avoided) and changed the name of the form
but no success.
Perhaps I have to dig deeper in this regard.


Any thoughts to a resolution would be appreciated.



steve
 
Thanks to anyone who might respond...

I have found a solution:
"If CurrentProject.AllForms("New-Form-Name").IsLoaded Then...."

Thoughts on why the other problem manifests itself are still welcome.



steve
 
Thanks to anyone who might respond...

I have found a solution:
"If CurrentProject.AllForms("New-Form-Name").IsLoaded Then...."

Thoughts on why the other problem manifests itself are still welcome.

You do know that IsLoaded() is a custom function that has widespread use, but is
not built into Access right? The IsLoaded property that you show above was
added in newer versions of Access.
 
You do know that IsLoaded() is a custom function that has widespread
use, but is not built into Access right? The IsLoaded property that
you show above was added in newer versions of Access.


Rick

Yes, I do. Now
Ahem.(as I clear my throught of embaressment)
Apparently I posted to this group when I should have looked in the
appropriate group "microsoft.public.access.formscoding"

I got all my questions answered there. And more.
Duh-Oh!

So I went back to the original database and copied the "Global Code" module
and all is well.

I now have two solutions.


Thanks Rick


Lesson learned - Always look in the last place first, because that's where
you'll find it.

8-)

cheers

steve
 
Back
Top