This is an undocumented technique that may rescue a bad form or report by exporting it to a text file, and instructing Access to recreate it from the text file.
Make a backup of your database.
Open the code window (Ctrl+G) and look through the modules (Windows menu.)
If you can see a module for this form/report, copy the text out to Notepad, and save it.
Open the Immediate Window (Ctrl+G), and export the form/report as a text file. Enter something like this:
SaveAsText acForm, "Form1", "C:\MyFolder\Form1.txt"
substituting your form name for Form1 and your directory for MyFolder. Use acReport if the problem object is a report.
Verify that the text file was created in the folder you specified.
Delete the form from the database.
Select it in the Navigation Pane (Access 2007 or later) or Database Window (previous versions), and press Del.
Compact the database:
In Access 2010, Compact and Repair Database on the Database Tools ribbon.
In Access 2007, click Office Button (top left) | Manage | Compact.
In Access 95 - 2003, Tools | Database Utilities | Compact.
Open the Immediate Window (Ctrl+G). Enter something like this:
LoadFromText acForm, "Form1", "C:\MyFolder\Form1.txt"
substituting the same things you did at Step 3 above.
You will receive an error message at Step 3 if Access cannot make sense of the form to export it. You will have to delete the form and re-create it, but if you saved the code at Step 2 you can at least paste that back into the new form's module after you create it.
If Step 3 works without error, there is a good chance the rest of the steps will succeed too.