PC Review


Reply
Thread Tools Rate Thread

ADOBO control of Access Make Table query

 
 
Peter G
Guest
Posts: n/a
 
      6th Nov 2009
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Control Field Properties With Make Table Query? quirkyjoe Microsoft Access Getting Started 1 5th Apr 2007 06:22 PM
make table query -- preserving table control properties =?Utf-8?B?VGVk?= Microsoft Access Queries 2 8th Mar 2006 04:21 PM
Make Table query on ODBC table changes NULLs to empty strings in Access 2002 Les Mercer Microsoft Access Queries 0 29th Jun 2004 10:01 AM
RE: Access 97 convert a xtab query into a make table query =?Utf-8?B?SmVuMTIxNw==?= Microsoft Access Queries 1 15th Apr 2004 05:16 PM
How do I stop Access from asking confirmation to delete a table in a Make-Table Query? Mike Webb Microsoft Access Queries 4 8th Mar 2004 08:54 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:05 AM.