Access Database damaged

Hi,
I am an MS Access programmer and I have a weired situation.
I can the main menu, but when I click the buttons to open other forms, no response. I can open the forms manually from the FORM section in ACCESS, but again the buttons that I have added to the forms are there but does not do anything when you click them. Strange enough, default Access default controls (such as Drop-down menu, record navigation buttons at the bottom of the form, Tabs) do still work
I opened one form in design view and opened "On Click Event Procedure" and found no code/VB associated with each button.

Fortunately I do have old-dated database files that I can import the forms from, but I like to know :
(1) what just happened and
(2) If it is a good idea to just import forms from a good previous database and continue to use this datbase or open the most recent database file and import tables/queries and etc from the damaged database. Obviously this involves more work.

Access corruption is the name of the game. It happens routinely when developing. Take a copy daily, repair often. Go to an earlier known good copy and import the required items. The current copy is not

Access corruption is the name of the game. It happens routinely when developing. Take a copy daily, repair often. Go to an earlier known good copy and import the required items. The current copy is not worth saving.

<< I opened one form in design view and opened "On Click Event Procedure" and found no code/VB associated with each button.>>

The VBA project is corrupt. You can try getting it to work using the /Decompile switch at startup.

<<(1) what just happened and>>

Make sure your up to date with service packs. I disagree with Chris that "It happens routinely when developing."

I think I've only had corruption at most a half dozen times in nineteen years of Access development (although I must say, I never use new versions until at least service pack 1).

<<2) If it is a good idea to just import forms from a good previous database and continue to use this datbase or open the most recent database file and import tables/queries and etc from the damaged database. Obviously this involves more work.>>

I would try /decompile first. If that doesn't work, then it's a toss up which way to go. Sounds like the older DB would be the least amount of work. At least you get some code that way and if you have new objects, you could import those from the current DB.

Featured Post

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…

Here are a few simple, working, games that you can use as-is or as the basis for your own games.
Tic-Tac-Toe
This is one of the simplest of all games.
The game allows for a choice of who goes first and keeps track of the number of wins for…

Learn how to number pages in an Access report over each group.
Activate two pass printing by referencing the pages property:
Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code.
This l…