Report will not "view" on screen, flashes back to design view

G

Guest

I have created a report in design view. When I click on view, the screen
flashes, but the report does not appear. It stays in design view.

If I try to run the report from the reports menu, screen flashes and report
menu re-appears.

Other reports in this database run fine.

Using Access 2000 with Windows XP

Thanks for any help.
 
A

Allen Browne

Okay, so *something* is wrong with this report.
There could be any number of possible causes.

Is the report set for the same printer as your other reports, or a specific
printer:
File | Page Setup | Page (from design view)?

Any code in this report's module?

Any calculated fields, esp. those with a user-defined function call?

What is the RecordSource of this report? Table? Query? SQL statement?
Crosstab?

Any subreports?

Any error message?
 
G

Guest

Same printer as other reports.
Expressions for calculations.. yes
No Sub Reports
Made from Query.

New developement. I made a copy of the report. Copy also does same thing.
By process of elemenation, I kept deleting things to try to find the culprit.
I ended up deleting everying and it still would not go into view mode.
 
A

Allen Browne

Okay, the copy was a good idea to try.

Try creating a new report, choosing the same query as its source. Just put
one text box on this report. Does this work? (I will assume that worked, and
so there is no problem with the query as the source.)

Try this sequence:

1. Uncheck the boxes under:
Tools | Options | General | 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

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, and compact again.

5. Open the Immediate Window (Ctrl+G)
Enter:
SaveAsText acReport "Report1", "C:\Report1.txt"

6. If that works, delete the existing report.
(You still have the backup you made at step 3, right?)
Then compact the database again (to get rid of it.)
Then try importing the report from the text file created at step 5:
LoadFromText acReport "Report1", "C:\Report1.txt"

If step 5 generates an error, the report is corrupt. You may be able to
import it from an old backup that does not have the problem, or you may need
to recreate it from scratch.
 

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