Link to home
Start Free TrialLog in
Avatar of bsncp
bsncpFlag for Afghanistan

asked on

MS Access 2007 cannot add RunSQL step to macro

I am trying to build a macro in Access 2007 and one of the steps I'd like to add is the RunSQL step.  It is not available in the list of Actions.  I've read this might be related to Trust Center settings.  I verified the location of this db is in a trusted directory, which happens to be my desktop.

Does that have anything to do with it or am I looking at the wrong issue?  
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

You can do it in code

Dim sSQL As String
DoCmd.RunSQL sSQL

mx
Avatar of bsncp

ASKER

Thanks, mx.  But I'm looking to build a multi-step macro, of which this RunSQL action will be just one step.  I like being able to add RunSQL as a step in the macro and trhen type my SQL statement right in.  

Is RunSQL not anoptional action in Access 2007 macros or is in fact some sort of Trust Center issue?  I am used to 2003, so just trying to understand the nuances of 2007.
Well, I don't know.  My A2010 system is at home.
But I've got to believe it's there somewhere, maybe under a different category ...?

mx
ASKER CERTIFIED SOLUTION
Avatar of Dale Fye
Dale Fye
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bsncp

ASKER

Not sure what you mean by category, but when building a macro, you only get to choose from one drop-down menu of Actions.  RunSQL is an option in 2003 but not in 2007 so far.  My research on the web says it is Trust Center related, so I need help from someone who understands that piece of it.
Avatar of bsncp

ASKER

Very well done...thank you!!