I am trying to query information from the SQL server and when I am running Make Table Query and it creates it on SQL server instead of in Access.
Dim myConnection As ADODB.Connection
Set myConnection = New ADODB.Connection
Dim rstSource As ADODB.Recordset
Set rstSource = New ADODB.Recordset
myConnection.ConnectionString = "Provider=MSDASQL.1;" & _
"Persist Security Info=False;" & _
"User ID=;" & _
"Pwd=;Data Source=TAI_MONY"
myConnection.Open
rstSource.Open "SELECT REINSPM.* INTO TEST FROM REINSPM WHERE (((REINSPM.PM_PLAN)='3314'))", myConnection
'MsgBox (rstSource.Fields("PM_PLAN"))
' Close the connection.
myConnection.Close
Dim myConnection As ADODB.Connection
Set myConnection = New ADODB.Connection
Dim rstSource As ADODB.Recordset
Set rstSource = New ADODB.Recordset
myConnection.ConnectionString = "Provider=MSDASQL.1;" & _
"Persist Security Info=False;" & _
"User ID=;" & _
"Pwd=;Data Source=TAI_MONY"
myConnection.Open
rstSource.Open "SELECT REINSPM.* INTO TEST FROM REINSPM WHERE (((REINSPM.PM_PLAN)='3314'))", myConnection
'MsgBox (rstSource.Fields("PM_PLAN"))
' Close the connection.
myConnection.Close