Again, as usual, I have done my fair share of research last night on this. My issue is to append a table using the following query output.
Last night I saw an article on internet but I couldn't get to it this morning. I know we have to use "Insert Into" statement. All the examples available are using "sql" coding within VBA instead of converting like I did.
Could you please help me the following to output to a table by appending it?
Table name is "PROVINCE TO COUNTRY RATES"
The fields that exists are: (as copied from SQL)
INSERT INTO [PROVINCE TO COUNTRY RATES] ([ORIGIN CITY], [ORIGIN PROVINCE], [DESTIN CITY], [DESTIN PROVINCE], SERVICE, Class, [MIN], LTL)
I want to integrate the above into this query
CurrentDb.Execute "SELECT '" & ocity & "' as [ORIGIN CITY], '" & oprov & "' as [ORIGIN PROVINCE], ZONE.CITY AS [DESTIN CITY], ZONE.PROVINCE AS [DESTIN PROVINCE], INTER.SERVICE, INTER.Class, INTER.[MIN], INTER.[LTL] INTO [TEMP2] FROM [ZONE] INNER JOIN INTER ON ZONE.[TCOMBI] = INTER.DTCOMBO WHERE INTER.SERVICE =" & Chr(34) & [Forms]![Prov2Country]![servicecombo] & Chr(34) & " And ZONE.[ZONE] = " & Chr(34) & "LOCAL" & Chr(34) & " And INTER.[TCOMBO] Like " & Chr(34) & userinput & "*" & Chr(34) & " ORDER BY ZONE.CITY, INTER.Class", dbFailOnError
So I do not want to output to table called 'TEMP2' rather append to table called 'PROVINCE TO COUNTRY RATES'
Any help is much appreciated!