Dan, Microsoft added an OpenArgs to OpenReport in Access 2002. If one of the
users added this to the A2003 code as Doug surmised, it would then fail in
Access 2000.
But A2000 and 2003 also use different binaries for the compiled code, so it
is not uncommon to find that an mdb that has been modified in A2003 fails
nonsensically in A2000. The workaround is to decompile the database in
A2000. To decompile, enter 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"
Then open a code window in A2000, and choose Compile on the Debug menu to
make sure it compiles.
It should then work until someone opens it in A2003 and messes around with
it again. To prevent that from happening, you might want to create an MDE
using A2000, and distribute an MDE front end to each user instead of the
MDB.
If you do need an example of how to conditionally execute code depending on
the version, there is an example in this article:
http://allenbrowne.com/AppRelReport.html
Follow the "code in this link" to:
http://allenbrowne.com/AppRelReport.txt
and scroll down to the bottom of the code.
The line:
If Int(Val(SysCmd(acSysCmdAccessVer))) >= 10 Then
means the code is skipped in A2000 and earlier.
Note also the use of the literal instead of the constant A2000 lacks.
And the use of Object instead of Report for the argument passed in, so A2000
doesn't complain that Report don't have this property.