Make table query

B

barryderay

Can someone please tell me what is wrong with this query. It is ran in
outlook and one of many application I call on. Every this else is working. I
can get this project to open and it runs through the rest of the code but
doesnt make the table.

Dim ac As Access.Application
Dim blnWeOpenedAccess As Boolean

Set ac = GetObject(, "Access.Application")

If ac Is Nothing Then
Set ac = CreateObject("Access.Application")
blnWeOpenedAccess = True
End If

Dim objDB As DAO.Database
Dim objQDF As DAO.QueryDef

ac.OpenCurrentDatabase ("R:\V3\V3test.mdb")
Set objDB = CurrentDb()
ac.Visible = True

Set objQDF = objDB.CreateQueryDef("test45")

objQDF.Sql = "SELECT membergrids.* INTO test45 FROM membergrids "

objQDF.Execute
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top