Solved

MS Access 2007 cannot add RunSQL step to macro

Posted on 2010-08-13
6
1,318 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

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.

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Outlook Free & Paid Tools
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 …
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

911 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now