Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot run Access 2000 form on Access 2007

Status
Not open for further replies.

rhyno2k

IS-IT--Management
Jun 9, 2001
222
US
Hi,


I have a (fairly reliable) RMA generation database that was created in Access 2000. It has worked in Access 2000, and even Access 2003. However, it is giving nothing but fits in Access 2007.

Upon opening I get a "there is no object in this control" error message. And upon clicking the Generate RMA button (fairly important to the form :) ), I get a Run-time error '3085': "Undefined function 'Command' in expression.

The line it's broken on reads:
DoCmd.OpenReport "RMAReport", 2

This Access app was developed a while ago (obviously), and as I mentioned, works fine in Access 2003 (which most of our users use).

But one of the primary users has just been upgraded to the 2007 suite, and needs access to this form's functionality. What can be done?

I tried googling the heck out of both errors, but articles are either too generic, or refer to Access 97, or other dead ends.


Thanks,
--RHYNO
 
I don't have 2007, but the command
DoCmd.OpenReport "RMAReport", 2

is really the same as DoCmd.OpenReport "RMAReport",acViewPreview

you might want to change the 2 to acViewPreview and see if that line still gives you an error.

PaulF
 
Hi Paul,


I changed the 2 to acViewPreview, but still get the same error.


Thanks,
--RHYNO
 
Have you checked the references to make sure that none of them are marked MISSING? I have found that 2007 can say some odd things when any references are missing.
 
I've resolved the issue.

Even though the database was in a location noted as trusted in the Trust Center (are you really, really sure you really want to trust this... ugh), Sandbox mode prevented "DoCmd" from running.

So I changed the Sandbox mode from 3 to 2, and the button now runs successfully.

Now the form doesn't display anything except the header (!) -- the full form comes up fine in Access 2003 -- but I'll research that now, and start a new thread for that if need be :)


Thanks for the responses,
--RHYNO
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top