Hello,
i have a VBA code that sends data from excel to one of three access databases. Table1 and Table2 work great. but the data for Table3 is sent to a TempTable. From here, the all the data in TempTable is linked with 5 columns in Table1 in an Append Query. Up until here everything works great. The datasheet view of the Append Query (TempToFinal) show exactly the number of files and the correct information needed to append to Table3.
BUT no matter what code i use to run, execute, or open this append query, it doesnt append anything to Table3.
MANUALLY it appends correctly. NOT through excel VBA code.
Dim SQLcode As String
SQLcode = "INSERT INTO RFCWells " & _
"SELECT TempToFinal.* " & _
"FROM TempToFinal ;"
I have used the following:
1. CurrentDb.Execute (SQLcode) , dbFailOnError
2. appAccess.DoCmd.OpenQuery "TempToFinal"
3. appAccess.DoCmd.RunSQL SQLcode, dbFailOnError
All my warnings are set to false.
i have a VBA code that sends data from excel to one of three access databases. Table1 and Table2 work great. but the data for Table3 is sent to a TempTable. From here, the all the data in TempTable is linked with 5 columns in Table1 in an Append Query. Up until here everything works great. The datasheet view of the Append Query (TempToFinal) show exactly the number of files and the correct information needed to append to Table3.
BUT no matter what code i use to run, execute, or open this append query, it doesnt append anything to Table3.
MANUALLY it appends correctly. NOT through excel VBA code.
Dim SQLcode As String
SQLcode = "INSERT INTO RFCWells " & _
"SELECT TempToFinal.* " & _
"FROM TempToFinal ;"
I have used the following:
1. CurrentDb.Execute (SQLcode) , dbFailOnError
2. appAccess.DoCmd.OpenQuery "TempToFinal"
3. appAccess.DoCmd.RunSQL SQLcode, dbFailOnError
All my warnings are set to false.