Solved

Which Refence to add to VBA MSAccess 2010 - SQLCommand

Posted on 2014-12-06
3
244 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 50

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 50

Expert Comment

by:Gustav Brock
ID: 40484476
You are welcome!

/gustav
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
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 …

739 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