What does 'error executing the command' mean? (1 Viewer)

kessmiller

New member
Local time
Today, 13:01
Joined
Mar 21, 2011
Messages
8
I have a database that I created in Access 2003 that creates a report. The report runs fine when I run it on my computer using Access 2003, but gets and error 'There was an error executing the command.' when I try to run it on another machine running Access 2007. I don't know where to look even to find out what this error means and can't find any posts on it.

Which brings up a general question on the search feature on this site... When I try to search for key words error executing command I get all posts with any of these words. Is there an option to search for only posts with all of these words? I see it in the FAQ section, but not here.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 18:01
Joined
Sep 12, 2006
Messages
15,614
i take it you are using the MS switchboard

that message is a generic message for any switchboard command that fails

maybe the switchboard item isn't set up correctly. maybe the target doesn't exist. maybe the target form/report just didn't open. they all produce a similar cryptic message.

i actually modify my switchboard code to provide a more meaningful response.

try opening the form/report directly - see if it opens. if it does, then there may be something wrong in the switchboard code.
 

kessmiller

New member
Local time
Today, 13:01
Joined
Mar 21, 2011
Messages
8
OK. Big duh moment. I had not installed the ODBC links needed on my users PC. They're on mine, so I didn't think of them. Thanks for pointing me in the right direction.

How would I edit the switchboard messages to be more informative? I'm not too great on the coding side.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 18:01
Joined
Sep 12, 2006
Messages
15,614
you need to look at the "handlebuttonclick" event

in there there is an on error statement. if you get an error it just goes to the error handler, that says "Error executing the command"

so you can change the code in there to provide a more informative error message - or indeed handle different errors differently.
 

Users who are viewing this thread

Top Bottom