So you created an ACCDB file, and converted it to an MDB (2002/3 format.)
In the database, you have used some code like this to open the report:
DoCmd.OpenReport "Report1", acViewReport
and this doesn't work in Access 2003.
There could be several things here. For example, if you just applied a
different filter in A2003, and it happened that no records matched, you
could get that message via the report's NoData event.
Report view and Layout view don't exist in A2003. Try acViewPreview.
If that's not it, the problem could be to do with a bad binary for the VBA
code. This is quite common, esp. when switching versions. A compact,
decompile, compact should fix it. (Details below.)
Name AutoCorrect could also be behind this:
http://allenbrowne.com/bug-03.html
It could be part of a wider problem with a bad printer driver (if these are
different computers.)
It could be a matter of library references:
http://allenbrowne.com/ser-38.html
If the sorting'n'grouping pane in A2007 sorts/groups on a prefix of a field
and then by the whole field, it could be an A2007 bug.
Or, there could be something wrong with the report itself, and the
undocumented SaveAsText and LoadFromText could fix it.
Try the standard rescue sequence below. Post back if that doesn't work, and
you need more details of any of the ideas above.
Try this sequence (in order):
1. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
In Access 2007, it's:
Office Button | Access Options | Current Database | Name AutoCorrect
2. Compact the database:
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.
5. Open a code window.
Choose References from the Tools menu.
Uncheck any references you do not need.
For a list of the ones you typically need in your version of Access, see:
http://allenbrowne.com/ser-38.html
6. Still in the code window, choose Compile from the Debug menu.
Fix any errors, and repeat until it compiles okay.
7. Still in the code window, choose Options on the Tools menu. On the
General tab, make sure Error Trapping is set to:
Break on Unhandled Errors
and the Compile on Demand is unchecked.
At this point, you should have a database where the name-autocorrect errors
are gone, the indexes are repaired, inconsistencies between the text- and
compiled-versions of the code are fixed, reference ambiguities are resolved,
the code syntax is compilable, and the VBA options are set to show errors
and avoid this kind of corruption.
If it is still a problem, the next step would be to get Access to rebuild
the database for you. Follow the steps for the first symptom in this
article:
Recovering from Corruption
at:
http://allenbrowne.com/ser-47.html