lost VBA code for some forms

  • Thread starter Dsperry101 via AccessMonster.com
  • Start date
D

Dsperry101 via AccessMonster.com

Help !

Something has happened to a couple of my forms where I can't access the
VBA code I used to have with those (not all in the DB) forms. I can get to
the VBA editor on other forms and the Project Explorer lists the other forms
and modules but not the ones that have the problem. OK , well I thought I
could just redo the VB code for those forms but I can't even do that. When I
go to the events in the form's properties and try to add VBA code for an
event by selecting Code Builder in the build method selection box it just
sits there and looks at me !
Any one had a problem like this ?


Dan S
 
E

Ed Robichaud

Those objects (forms) are probably corrupt. Make a backup of your MDB.
Then open a new blank MDB, import those objects, run repair & compact and
see if you now have access to the code behind forms. If so, delete the
originals, and re-import those back into the old MDB. If not, you'll just
have to delete the forms and re-create them.
-Ed
 
A

Arvin Meyer [MVP]

Dsperry101 said:
Help !

Something has happened to a couple of my forms where I can't
access the VBA code I used to have with those (not all in the DB)
forms. I can get to the VBA editor on other forms and the Project
Explorer lists the other forms and modules but not the ones that have
the problem. OK , well I thought I could just redo the VB code for
those forms but I can't even do that. When I go to the events in the
form's properties and try to add VBA code for an event by selecting
Code Builder in the build method selection box it just sits there and
looks at me ! Any one had a problem like this ?

First, always work on a copy of the database. Working on the original may
make it impossible for a repair service to fix it.

Download a copy of JetComp.exe:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;273956

Try backing up your forms as text with the undocumented SaveAsText
LoadFromText functions:

http://www.datastrat.com/Code/DocDatabase.txt

Also have a look at the Microsoft KB article:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;209137

Then have a look at Tony Toews' Access Corruption FAQ at:

http://www.granite.ab.ca/access/corruptmdbs.htm

for some suggestions. Unfortunately, some corruption cannot be fixed - you
may need to create a new database, import what can be salvaged, and recreate
the rest.

Although it's a paid service, Peter Miller does an outstanding job of saving
corrupt databases. Try this URL:

http://www.pksolutions.com
 

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