VBA - IsLoaded() - Compile Error

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
 
S

SWalker

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
 
R

Rick Brandt

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.
 
S

SWalker

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.

:cool:

cheers

steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

ISLOADED Compile error 6
IsLoaded 1
IsLoaded not working 2
Error IsLoaded [Ambiguous name detected: IsLoaded] 4
IsLoaded compliance error 15
Child Forms and .isLoaded 2
Module mystery 2
BeforeUpdate Problem 3

Top