Can't Open VB Editor and VB scrip won't run AFTER reopening database

  • Thread starter I'm a Trampoline
  • Start date
I

I'm a Trampoline

I created a database, thought all was fine until I quit it and opened it
again. The VB wouldn't run, I couldn't open the editor from design view
of any form, and when I tried to open it through the menu, all I would
get is a corrupted window (no scroll up button, no way to access the
Project Explorer) containing just the one module I had, but I couldn't
get to the Class Objects.

I tried to compact and repair it, and decompile (that crashed Access).

I then made a copy, set the Has Module property for all forms to No,
imported everything into a new database, and wrote the code again (this
time I exported all the class objects and the module before quitting in
case I need them later). It was working fine until I quit it and opened
it up again.

Something else I tried (well I've tried all sorts of things) was to
import just the tables and queries into a new database, create new
forms, and copy and past the form objects on to them. I then copied and
pasted the script back into the Class Objects. I thought there might
have been something that was corrupted in one of the forms, and this was
a way to avoid it. No joy.

From much playing, I've come to the conclusion (I think) that if I
import anything from this database into a new one, it will screw up the
new one in the same manner.

What's left to try? I'm not starting again so I'm prepared to give this
up, it was just a more improved version of an already existing database
I'm using personally - for me only, in my job.

Thanks in advance.
 
I

I'm a Trampoline

Albert said:
In addtion, check out:

Network Connection may be lost

If you imported some code, and then closed the
project without compacting, you have probably struck this bug:

http://support.microsoft.com/?id=304548

It will mean restoring your project from a backup.

To prevent the problem recurring, download the latest service pack from:
http://support.microsoft.com/support/servicepacks/

I know it's not this one, I've experienced this before. I had my network
administrator scratching his head thinking it was a network problem.

It turns out I was wrong when I said I couldn't copy anything else into
a new database without corrupting it in the same way, that's almost
right but not quite. I recreated it by making new forms, copied and
pasting the objects back on to them and then pasted in the code for
each, but this time I changed the names of all forms. This fixed it. On
a copy I renamed them back just to see, and this corrupted it.

So apparently there's some residual corruption in the database, that was
copied over from the old one when I imported the tables and queries, and
it's only brought into effect when you have a form with a certain name.
It's quite unbelievable to me.
 

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