Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 252
  • Last Modified:

Which Refence to add to VBA MSAccess 2010 - SQLCommand

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
downehouse
Asked:
downehouse
  • 2
1 Solution
 
Gustav BrockCIOCommented:
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
 
downehouseAuthor Commented:
Thanks for quick reply, will save a fews hours!!
0
 
Gustav BrockCIOCommented:
You are welcome!

/gustav
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now