0

all of a sudden my ACCESS 2010 VBA Code cannot be opened any longer. I receive the error, that ID is no longe an Index of the table.

Pressing ALT - F11 does not open VB any longer.

Any ideas how I can recover my VBA Code?

2
  • When do you receive the error? When the db is first opened? If so, you could try opening the file while holding down the [Shift] key. This will prevent any startup forms or Autoexec macros from running, which may allow you to get at your code before getting the error message. Commented Nov 9, 2011 at 16:28
  • I can open the DB (an error poping up, but I can open it) Then, when I douple click on a module, the error I described pops up and finally nothing happens. Commented Nov 9, 2011 at 17:14

3 Answers 3

1

Please try some of the ideas here (although it depends on the database format, AC97/2000 etc.): http://allenbrowne.com/ser-47.html. Perhaps if you can repair the database enough so that whilst the structure may be truncated you could perhaps still get at your VBA code.

Sign up to request clarification or add additional context in comments.

4 Comments

@Proto Bassi: Which of the methods listed on that website did you actually try? It is a pretty exhaustive list (re-import objects into new db, decompile, SaveAsText/LoadFromText, etc.).
I tried: <br>Build in repair <br>Import <br>Delete References <br>Deleted all Indexes in the tables <br>Save as Text
How did you delete the references if you cannot open the VBA IDE? Or am I missing something?
I can open the DatabaseTools. From there I can delete the references between the tables and get rid of any Primary keys
1

I have found that Decompile followed by compact and repair will often fix this problem.

Comments

0

Enable the Developer Tab per http://msdn.microsoft.com/en-us/library/bb608625.aspx and click the Visual Basic button.

4 Comments

Developer Tab is enabled and the VB Button does the samme as described above.
In ACCESS there is nothing like a developer tab. But I know where to press to get to VB.
So you clicked the VB button under Database Tools and nothing happens? Can you test the DB on another machine to determine if it's a problem with your OS?
I made a backup two days ago and that one works without a problem. But I would loose two days.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.