deharris2003
Programmer
Hi, I have created a small function that should update an SQL table based on a local table stored in Access. Problem is I cannot get the function to recoginize the local table as a valid table. Any help is apreciated here is what i currently have
Public Function UpdateAetnaSource()
'------------------------------------------------------------------
'This function is used to automate the process adding new records
'to the Aetna_Leakeage table for the end user.
'This was created as an Alternative to giving the end user
'direct access to the SQL Database table
'------------------------------------------------------------------
Dim Conn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim db As Database
Dim Table As TableDef
Set Conn = CreateObject("ADODB.Connection"
Conn.Open "DSN=TSU;UID=Test;PWD=temp"
strSQL = "INSERT INTO [DBO].Aetna_Leakage " & _
"SELECT Temp_Data.* " & _
"FROM Temp_Data"
Conn.Execute strSQL
Conn.Close
Set Conn = Noth
Public Function UpdateAetnaSource()
'------------------------------------------------------------------
'This function is used to automate the process adding new records
'to the Aetna_Leakeage table for the end user.
'This was created as an Alternative to giving the end user
'direct access to the SQL Database table
'------------------------------------------------------------------
Dim Conn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim db As Database
Dim Table As TableDef
Set Conn = CreateObject("ADODB.Connection"
Conn.Open "DSN=TSU;UID=Test;PWD=temp"
strSQL = "INSERT INTO [DBO].Aetna_Leakage " & _
"SELECT Temp_Data.* " & _
"FROM Temp_Data"
Conn.Execute strSQL
Conn.Close
Set Conn = Noth