LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Duplicate Record....


Jamie Collins Wrote:
sal21 wrote ...

UHM... for me this is Arabic language


It's actually the SQL language.

Do you like to modify my script


Erm, OK then. The following is untested so ensure you have copies o
your files:

Sub ADO_PAGATI()
' exports data new rows from the active worksheet
' to a table in an Access database
Dim cn As ADODB.Connection

' connect to the Access database
Set cn = New ADODB.Connection
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=D:\PROVA\PROVA.MDB;"

' Add new rows
Dim lngRowsAffected As Long
cn.Execute "INSERT INTO TOTALE" & _
" SELECT T1.[DATA CONT#], T1.DIP, T1.COD, T1.[C/C]," & _
"T1.NOMINATIVO, T1.[CAUS#], T1.[IMP# DARE]," & _
"T1.[IMP# AVERE], T1.[VAL#], T1.[SPORT# MITT#]," & _
"T1.[ANOM#], T1.[DESCRIZIONE OPERAZIONE]," & _
"T1.[INDICE (C#R#O#)], T1.ABI, T1.CAB," & _
"T1.[PAG#/IMP#], T1.[NR# ASS#], T1.MT, T1.SERVIZIO," & _
"T1.[NOTE B#O#U#], T1.SPESE, T1.[DATA ATTIVITA']," & _
"T1.COD1 FROM TOTALE AS T1 LEFT JOIN" & _
" [Excel 8.0;HDR=YES;Database=C:\MyWorkbook.xls;]" & _
".[L0785_TOTALE$A6:W65535]" & _
" AS T2 ON T1.SERVIZIO = T2.SERVIZIO" & _
" WHERE T2.SERVIZIO IS NULL", lngRowsAffected

cn.Close

MsgBox lngRowsAffected & " added to database."

End Sub


Jamie.

--

send me ths cript :(
i am "out of memory

--
sal2

-----------------------------------------------------------------------
sal21's Profile:
http://www.excelforum.com/member.php...nfo&userid=204
View this thread: http://www.excelforum.com/showthread.php?threadid=27654

 
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
On Duplicate, update record MikeD1224 Excel Discussion (Misc queries) 1 April 2nd 09 10:19 PM
How do I remove duplicate in a column but keep the record of the f sragor New Users to Excel 2 February 3rd 09 04:42 PM
Need to color 1 record of each set of Duplicate Records nirod Excel Worksheet Functions 3 May 21st 07 02:36 PM
Duplicate Record.... sal21[_45_] Excel Programming 1 November 10th 04 04:10 PM
Duplicate Record.... sal21[_44_] Excel Programming 1 November 9th 04 04:24 PM


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

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

About Us

"It's about Microsoft Excel"