Leif, if you are able to design some reports but not others, it sounds like
a corruption in the database (unless these reports were assigned to a
particular printer with a faulty printer driver.)
Firstly, let's programmatically ask Access if the report exists. It keeps 2
copies of the reports, so let's see if it's in both collections. Open the
Immediate Window (Ctrl+G), and try this, substituting your report name for
MyReport:
? CurrentProject.AllReports("MyReport").Name
If that responds with the name of the report, try this one (it's one line):
? DLookup("Name", "MSysObjects",
"(Name = 'MyReport') AND ([Type]= -32764)")
If that all works, make a backup of your database, and let's see if we can
get Access to recreate the report for us. The command for the Immediate
Window is like this:
SaveAsText acReport, "MyReport", "C:\MyFolder\MyReport.txt"
using your own report name and foldter name.
If that executes without error, continue:
1. Delete the report.
2. Make sure Name AutoCorrect is off 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
3. Compact the database to get rid of this junk:
Tools | Database Utilities | Compact/Repair
or in Access 2007:
Office Button | Manage | Compact/Repair
4. Get Access to create the report again from the text file:
LoadFromText acReport, "MyReport", "C:\MyFolder\MyReport.txt"
Let us know how you went.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Reply to group, rather than allenbrowne at mvps dot org.
Leif said:
On some reports when I click the Design button nothing happens. The
report
does not come up. On other reports it does come up.
I've tried compact and repair. I've tried rebooting my computer. I first
notice the problem when I tried to create a snap report, thru VBA. It
complained it could not find the object. When I tried to go into design
view
for the report nothing happened. Literally nothing happened. No error
message. No design view. Its like the button has no effect. Trying
other
reports some come up, other don't. Has anyone seen this problem before?
Regards,
Leif