🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.bazy-danych.msaccess
Article #137342

Re: export kwerendy do pliku csv

#137342
From: MaciejF
Date: Thu, 01 Dec 2016 08:14
29 lines
2276 bytes
poprawnie będzie tak:

Dim db As Database
Dim strDel As String
Dim strINS As String

Set db = CurrentDb


strDel = "DELETE * FROM tblTmpExpDPD" 

strINS = "INSERT INTO tblTmpExpDPD (S_Name, S_Address, S_Zip) SELECT FIRMA.Nazwa AS S_Name, FIRMA.Ulica AS S_Address, FIRMA.Kod AS S_Zip FROM FIRMA, [Export DPD2] WHERE ((([Export DPD2].Wydrukowane)=2));" 

Db.Execute strDel 
Db.Execute strINS 


Dim strFullPath As String 
Const conFileNameCSV As String = "TestCsv.csv" 
Const conTblName As String = "tblTmpExpDPD" 
Const conSpecyficationName As String = "MojaSpecyfikacja" 

   strFullPath = CurrentProject.Path & "\" & conFileNameCSV 
   DoCmd.TransferText acExportDelim, conSpecyficationName, conTblName, 
strFullPath, True 

Poprzednio były błędy.

MF
Technical Details
Message-ID: <e55e39fe-facb-4658-9e98-643fc8d63034@googlegroups.com>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!news.cyf-kr.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!feeder.erje.net!2.us.feeder.erje.net!newspeer1.nac.net!border2.nntp.dca1.giganews.com!nntp.giganews.com!p16no667800qta.1!news-out.google.com!j8ni2499qtc.0!nntp.google.com!p16no667796qta.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
References: <39d994b6-e28e-4fc2-a084-f06f776fd643@googlegroups.com> <o1ncda$qom$1@node2.news.atman.pl> <o1nfag$hsc$1@node1.news.atman.pl> <a2f903f1-dea0-4de3-9cb8-7fc139b2df9d@googlegroups.com>

Show Full Headers
Complete Article Headers
X-Received: by 10.99.112.85 with SMTP id a21mr17964635pgn.30.1480580056973;        Thu, 01 Dec 2016 00:14:16 -0800 (PST)
X-Received: by 10.157.8.134 with SMTP id 6mr2314836otf.17.1480580056905; Thu, 01 Dec 2016 00:14:16 -0800 (PST)
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!news.cyf-kr.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!feeder.erje.net!2.us.feeder.erje.net!newspeer1.nac.net!border2.nntp.dca1.giganews.com!nntp.giganews.com!p16no667800qta.1!news-out.google.com!j8ni2499qtc.0!nntp.google.com!p16no667796qta.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: pl.comp.bazy-danych.msaccess
Date: Thu, 1 Dec 2016 00:14:16 -0800 (PST)
In-Reply-To: <a2f903f1-dea0-4de3-9cb8-7fc139b2df9d@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=213.241.94.194; posting-account=kc7ZIQoAAAB5PkdJgxjq1dd8jnBK4MVp
NNTP-Posting-Host: 213.241.94.194
References: <39d994b6-e28e-4fc2-a084-f06f776fd643@googlegroups.com> <o1ncda$qom$1@node2.news.atman.pl> <o1nfag$hsc$1@node1.news.atman.pl> <a2f903f1-dea0-4de3-9cb8-7fc139b2df9d@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e55e39fe-facb-4658-9e98-643fc8d63034@googlegroups.com>
Subject: Re: export kwerendy do pliku csv
From: MaciejF <maciejfr@onet.pl>
Injection-Date: Thu, 01 Dec 2016 08:14:16 +0000
Lines: 30
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit