Deleting report in MSACCESS shuts down database

7

727ctb

When I try to open/delete or select a report from the OBJECTS window the
database shuts down by itself. This report is a copy of a report that
functions normally. the only difference is that its control source is a
querie and not a table. when i open the QUERIE(Table format) it opens with
no hassles.
 
A

Allen Browne

Sounds like the report has corrupted.

Try this sequence:

1. Delete the bad report.

2. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
In Access 2007, it's:
Office Button | Access Options | Current Database | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html

2. Compact the database to get rid of this junk:
Tools | Database Utilities | Compact/Repair
or in Access 2007:
Office Button | Manage | Compact/Repair

3. Close Access. Make a backup copy of the file. Decompile the database by
entering something like this at the command prompt while Access is not
running. It is all one line, and include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

4. Open Access (holding down the Shift key if you have any startup code),
and compact again.

Now to recreate the report:
5. Open the report you want to copy, in design view.

6. Choose SaveAs on the File menu to create the copy.
Close this report.

7. Open the newly created report in design view.
Set its RecordSource property to the desired query.

8. Compact again. Then test the report.

If it still crashes, there is another problem. For example, the new query
may not have all the field names the report is using (including any in its
Sorting And Grouping dialog, calculated controls, or Filter or OrderBy
properties.)

Or, if the query does contain the field, perhaps the field has changed data
type (which can happen with calculated controls.)

Or perhaps the report contains code that no longer works when based on the
new query.

Or perhaps this is Access 2007 with some known bugs.
 

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