Solved

MS Access 2007 cannot add RunSQL step to macro

Posted on 2010-08-13
6
1,346 Views
Last Modified: 2013-11-27
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?  
0
Comment
Question by:bsncp
  • 3
  • 2
6 Comments
 
LVL 75
ID: 33432771
You can do it in code

Dim sSQL As String
DoCmd.RunSQL sSQL

mx
0
 

Author Comment

by:bsncp
ID: 33432810
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.
0
 
LVL 75
ID: 33432837
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
0
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 250 total points
ID: 33432847
Right click on the header of the macro.  You should see an option that reads: Show All Actions.

Select that option and RunSQL will showup.
0
 

Author Comment

by:bsncp
ID: 33432868
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.
0
 

Author Closing Comment

by:bsncp
ID: 33432885
Very well done...thank you!!
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question