Solved

Which Refence to add to VBA MSAccess 2010 - SQLCommand

Posted on 2014-12-06
3
239 Views
Last Modified: 2014-12-06
I need to DIM a variable like
DIM CMD as New SQLCommand
the 'SQLCommand' option is not available in intilsense, I am guessing that is because the necessary refernce is missing. Have tried add a few and can get every SQLxxxx but the one I want ie SQLCommand.

All guidance really appreciated.
0
Comment
Question by:downehouse
  • 2
3 Comments
 
LVL 49

Accepted Solution

by:
Gustav Brock earned 500 total points
ID: 40484467
That's a .Net thing. In VBA it's:

Dim dbs As DAO.Database
Dim strSQL As String

Set dbs = CurrentDb
strSQL = "your SQL string to execute"

dbs.Execute strSQL

/gustav
0
 

Author Closing Comment

by:downehouse
ID: 40484474
Thanks for quick reply, will save a fews hours!!
0
 
LVL 49

Expert Comment

by:Gustav Brock
ID: 40484476
You are welcome!

/gustav
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

837 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