"File not found" and "The form name is misspelled..." errors

A

Anne

I am still bulding a database. It contains no data, and contains no embedded
macros. Yet, when I go to build code, I get these errors:
"File not found" followed by
"The form name * is misspelled or refers to a form the doesn't exist"

The problem does not lie in the form that automatically opens when the
database opens, and there are no embedded macros (I've read that these are
the two main places an error such as this can occur).

I did a search in the code box, and do find the two subforms listed even
though neither contains any kind of code. I can not figure out how to delete
these subforms from the code box, as they are wreaking havoc when I try to
build macros or write vb code.

I also already tried compiling db, which made no difference in terms of this
error.

Any other suggestions?
 
S

Stuart McCall

Anne said:
I am still bulding a database. It contains no data, and contains no
embedded
macros. Yet, when I go to build code, I get these errors:
"File not found" followed by
"The form name * is misspelled or refers to a form the doesn't exist"

The problem does not lie in the form that automatically opens when the
database opens, and there are no embedded macros (I've read that these are
the two main places an error such as this can occur).

I did a search in the code box, and do find the two subforms listed even
though neither contains any kind of code. I can not figure out how to
delete
these subforms from the code box, as they are wreaking havoc when I try to
build macros or write vb code.

I also already tried compiling db, which made no difference in terms of
this
error.

Any other suggestions?

Open the relevant form in design view. To select an un-selectable control
(say one you can't click on), open the properties sheet and use the
drop-down at the top of the window to select the control by name.
 
A

Anne

The error is not related to any control on any specific form. The error
occurs regardless of which form or subform I open. The sequence is this:
I open any form (or subform) in Design View.
I choose Build Event.
I choose Code Builder.
Then I get the two errors in succession.

After clicking through to close the error windows, I see the VB editor.

Two non-existent forms are listed in the Project Window of the VB Editor,
and there is no way I can delete them.

There is no code in the code window.

I need to remove these forms from the Access Database somehow, or prevent
this error from occurring somehow so that I can get on with code and macros.

-Anne
 
J

John W. Vinson

I need to remove these forms from the Access Database somehow, or prevent
this error from occurring somehow so that I can get on with code and macros.

You might want to try creating a new, empty database, and use file... get
external data... import to import everything EXCEPT these errant forms.

I'd suggest turning *off* Name Autocorrect - it's quite possible that it's to
blame.
 
A

Anne

I did copy everything to a new database, and fortunately, since I had only
mock data, was able to copy just the structure. I also turned off Name
Autocorrect.

However, there were never any errant forms, at least not at the time the
errors occurred. I still don't know where the errors came from, but I am back
in the saddle again.

All is well for now, anyway.

Thanks!
 

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

Top