Visual Basic Question

G

Guest

When I try to open a report I created I get a Module Not Found error. I went
into Visual Basic and there is a form called Form1 that if I click on it says
that Form1 is mispelled or does not exist. I do not have a Form1 in my Forms
or need as I use a different form on this report which is also appears on
this Visual Basic list. I do not need this Form1 in Visual Basic, but cannot
find a way to delete. I am just learning Access so any help would be
apprectiated.
 
A

Arvin Meyer [MVP]

First, before doing anything else, make a copy of the file as a backup. I
suggest creating a new empty database and importing all the objects into it.
You could also try a compact and repair, to see if that helps.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 
J

John Vinson

When I try to open a report I created I get a Module Not Found error. I went
into Visual Basic and there is a form called Form1 that if I click on it says
that Form1 is mispelled or does not exist. I do not have a Form1 in my Forms
or need as I use a different form on this report which is also appears on
this Visual Basic list. I do not need this Form1 in Visual Basic, but cannot
find a way to delete. I am just learning Access so any help would be
apprectiated.

You say "I went in to Visual Basic" - how did you do so? Try typing
Ctrl-G and clicking on the "Window" menu item: do you have more than
one VBA window open?

If the Form1 module contains code that you don't need, simply type
Ctrl-A to select it all, and press the Delete key to delete it. Then
select Debug... Compile, exit VBA, save any objects that it asks you
to save (and/or delete Form1 if you created it unintentionally), then
Compact.

I'd really recommend backing up the database first, just in case this
breaks something else that you weren't expecting!

John W. Vinson[MVP]
 
G

Guest

The importing the files into a blank database worked. Thanks. Can you tell
me why the Form1 that was listed in Visual Basics that was causing the error
didn't appear in Visual Basics when I imported everything over? It is
because there was no Form1 in the Forms file? Just trying to understand as I
am new to Access. Thanks.
 
A

Arvin Meyer [MVP]

The VBA project was corrupt. Form1 was apparently deleted at 1 time, but
left a code stub that still showed up. You can't import a corrupt object, so
building a new, clean database and importing the "good" objects saved the
day.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 

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