Append Query doesn't Run but doesn't Error

Annichka

New Member
Joined
Jun 24, 2019
Messages
5
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.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

Forum statistics

Threads
1,223,885
Messages
6,175,179
Members
452,615
Latest member
bogeys2birdies

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top