Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default ADOBO control of Access Make Table query

I have linked an Excel workbook from a table in an Access database. In order
for the data in the table to be correct it is updated by a "Make table query"
in the same Access database. I need to be able to update the query from Excel
and have tried the folllowing code

Sub UpdateAccess()
Dim con As New ADODB.Connection
Dim rst As New ADODB.Recordset
Dim SQL As String

MyFile = "C:\Bas\FTG1.mdb"
SQL = "SELECT Levfakt.Levnummer, Levfakt.Fakturadat INTO AAA_Tabell FROM
Levfakt"
con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & MyFile & ";"
rst.Open SQL, con, adOpenStatic


End Sub

My problem is that when I run the code I get an error message stating that
"The Table 'AAA_Tabell' arready exists"

Any suggestion how to change the code?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
execute a make table query in an access database Question Boy Excel Programming 1 April 18th 08 04:07 PM
Access query feeding spreadsheet control in a user form rjchristensen Excel Programming 0 October 19th 07 04:56 PM
Make table query will work in datasheet view but will not make tab WildlyHarry Excel Discussion (Misc queries) 0 August 28th 07 03:06 PM
Copy recordset from an Access "make table" query Laurie[_4_] Excel Programming 1 February 5th 04 09:45 AM
Linking a table in Access to a table in Excel using MS Query Diana[_5_] Excel Programming 1 January 16th 04 09:43 PM


All times are GMT +1. The time now is 08:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"