Solved

MS Access 2007 cannot add RunSQL step to macro

Posted on 2010-08-13
6
1,331 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

No matter the version of Windows you are using, you may have some problems with Windows Search running too slow or possibly not running at all. Before jumping into how you can solve this issue, just know there are many other viable alternative deskt…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

821 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