Export Access Query to a pipe delimited .csv file

Fairly new to Access VBA.

How can I export an Access Query to a pipe delimited .csv file???

I believe the VBA Syntax is...

DoCmd.TransferText acExportDelim, _
"Specification Name", "qry_name", "C:\PathName\FileName.csv"

How do I specify and indicate to make it pipe delimited, "|"???

Thanks for your review and hopeful for a replay.

PSULionRP

0
Utf
3/9/2010 2:27:01 PM
access 16762 articles. 3 followers. Follow

5 Replies
8399 Views

Similar Articles

[PageSpeed] 54

You would set that up in your specification, and save it.  That would be the 
"specification name" parameter.

"PSULionRP" wrote:

> Fairly new to Access VBA.
> 
> How can I export an Access Query to a pipe delimited .csv file???
> 
> I believe the VBA Syntax is...
> 
> DoCmd.TransferText acExportDelim, _
> "Specification Name", "qry_name", "C:\PathName\FileName.csv"
> 
> How do I specify and indicate to make it pipe delimited, "|"???
> 
> Thanks for your review and hopeful for a replay.
> 
> PSULionRP
> 
0
Utf
3/9/2010 2:41:01 PM
Can you be a little more specific Chris?? This is the first time I have ever 
attempted this. Or provide me an education link that might explain this in 
detail?

Thanks Chris.

"Chris" wrote:

> You would set that up in your specification, and save it.  That would be the 
> "specification name" parameter.
> 
> "PSULionRP" wrote:
> 
> > Fairly new to Access VBA.
> > 
> > How can I export an Access Query to a pipe delimited .csv file???
> > 
> > I believe the VBA Syntax is...
> > 
> > DoCmd.TransferText acExportDelim, _
> > "Specification Name", "qry_name", "C:\PathName\FileName.csv"
> > 
> > How do I specify and indicate to make it pipe delimited, "|"???
> > 
> > Thanks for your review and hopeful for a replay.
> > 
> > PSULionRP
> > 
0
Utf
3/9/2010 2:50:05 PM
First, you need to create a query that selects all the data that you want.  
Save it.  Then, run the query, and click on FILE, EXPORT.  You will get the 
export query window. Under the SAVE AS TYPE dropdown, select text files and 
then click on export.  The export text window will appear.  Select delimited, 
enter the pipe symbol for delimiter, and click on advanced.  Then, select 
SAVE AS, and enter a name.  This will be the "Specification Name".  Save the 
query.  The query name will be "qry_name".

Hope this helps.

   
"PSULionRP" wrote:

> Can you be a little more specific Chris?? This is the first time I have ever 
> attempted this. Or provide me an education link that might explain this in 
> detail?
> 
> Thanks Chris.
> 
> "Chris" wrote:
> 
> > You would set that up in your specification, and save it.  That would be the 
> > "specification name" parameter.
> > 
> > "PSULionRP" wrote:
> > 
> > > Fairly new to Access VBA.
> > > 
> > > How can I export an Access Query to a pipe delimited .csv file???
> > > 
> > > I believe the VBA Syntax is...
> > > 
> > > DoCmd.TransferText acExportDelim, _
> > > "Specification Name", "qry_name", "C:\PathName\FileName.csv"
> > > 
> > > How do I specify and indicate to make it pipe delimited, "|"???
> > > 
> > > Thanks for your review and hopeful for a replay.
> > > 
> > > PSULionRP
> > > 
0
Utf
3/9/2010 3:39:01 PM
"PSULionRP" <PSULionRP@discussions.microsoft.com> wrote in message 
news:87F9C276-0FC5-4B63-AB88-A5D7F00EE31D@microsoft.com...
> Fairly new to Access VBA.
>
> How can I export an Access Query to a pipe delimited .csv file???
>
> I believe the VBA Syntax is...
>
> DoCmd.TransferText acExportDelim, _
> "Specification Name", "qry_name", "C:\PathName\FileName.csv"
>
> How do I specify and indicate to make it pipe delimited, "|"???
>
> Thanks for your review and hopeful for a replay.
>
> PSULionRP
> 

0
De
3/13/2010 5:34:23 PM
yhhhhhh

"PSULionRP" <PSULionRP@discussions.microsoft.com> a écrit dans le message de 
groupe de discussion : 87F9C276-0FC5-4B63-AB88-A5D7F00EE31D@microsoft.com...
> Fairly new to Access VBA.
>
> How can I export an Access Query to a pipe delimited .csv file???
>
> I believe the VBA Syntax is...
>
> DoCmd.TransferText acExportDelim, _
> "Specification Name", "qry_name", "C:\PathName\FileName.csv"
>
> How do I specify and indicate to make it pipe delimited, "|"???
>
> Thanks for your review and hopeful for a replay.
>
> PSULionRP
> 
0
joelgeraldine
3/17/2010 1:37:05 PM
Reply:

Similar Artilces:

Access 97 can't resize database window
My database window with the listings of forms tables etc was adjusted to a smaller width, but resizing it is completely disabled and renders Access 2007 utterly useless for me. Is there anyway to 'reset' the window? ...

How to link with an Access DB
Hi, I have an Acces DB with many tables. I need to choose the name of a customer in a cell of Excel. For example, in acces I have this tables: Table1 Id Name Last Name City I need to choose the last name from a drop down menu in a spreadsheet and then in other cell I need to put all the data regarding the last name that I choose. I hope to be exaustive, and sorry for my english. :-) Many Thanks Stefano ...

exporting outlook 2000 pst files to a database
I need to export outlook 2000 to a database- attachments and all. Is there a simple way to do this so you can search and retreive messages and attachments in a database form? Thanks Jeff You can export individual folders to access or excel to have them available for searching. I have never tried to export my entire .pst file to access or excel however. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. After searching google.groups.com and finding no answer Jeff <laacid@yahoo.com> asked: | I need to export outlook 2000 to a database- ...

[Access 2007] How to edit custom menubar created in Access2003?
Hello, This is my first post to this server, Hello everyone. We're working on a database created by my collegue in MS Access 2003. Since some time we've moved to MS Access 2007. Now we find problems editing the menubar. Each time we want to remove/add/alter a menu item my collegue goes to his MS Access 2003 and changes a menu. In 2007 the full menubar is visible under Add-Ins ribbon menu. Normally there should be a system table USysRibbon, but it is not there. There are only MSys* objects. How can we change the menubar directly in MS Access 2007? Is that possible at al...

Access 2003 resets form variables during debugging while the form is open
Hello, I am using MS Access 2003. (FWIW, this is about an ADP project, not MDB.) A form has a variable that is initialized (by some function call) in Form_Load() and then stays unchanged for the form's entire lifetime. (In a language more advanced than VBA, it would be a constant, not a variable; unfortunately, in VBA I cannot initialize a constant by non- constant expression). Specifically, in my case it looks like this: Private sTempFileName as String ... Private Sub Form_Load() ... sTempFileName = GenerateTempFileName(...) ... End Sub Priv...

Here is fix for Windows file problems
If you have installed a Windows update and started having problems opening, closing, copying files, see: http://www.microsoft.com/communities/newsgroups/list/en-us/default.aspx?dg=microsoft.public.excel.misc&mid=1fe358b1-c8eb-4217-ad2a-4b9fcf741916 A better solution is offered at http://support.microsoft.com/kb/918165 "Problems in Windows Explorer or the Windows shell after you install security update MS06-015". Patricia Shannon wrote: > If you have installed a Windows update and started having problems opening, > closing, copying files, see: > > http://ww...

Fax Icon on my File menu and toolbar
I had a Fax Icon on my toolbar and also on the file menu. All of a sudden it is gone and I want it back. Where did it go? Was it a dedicated toolbar? Or was it just icons on a builtin toolbar? If it was a dedicated toolbar, you may get lucky and find it under: Tools|customize|toolbars tab (just not selected) But if it was on a builtin toolbar (along with the file menu), then maybe you reset your toolbar--also under: Tools|customize|toolbars tab selecting a toolbar and hitting the reset button. If that's what happened, I think I might try to find the Fax addin/workbook that added t...

backup file won't work!!
OK, now I've really had it! This is my last resort! Several years ago, while using Money 97, our computer crashed. We had backed up every time we used money, so I thought we were OK. However, we could never get the backup file to pull up after fixing the computer and everything was lost. I vowed that this would not happen again, so I tried backing up on a ZIP disk instead, and then on CDs. I also got on this newsgroup and got the advice that I needed to first copy the backup file onto the desktop and open it from there. I tried doing that with the old program, and it seeme...

office 2000 [excel] cannot open previously OK file. Help
When trying to open a Microsoft Excel Work Sheet that I had accessed modified and saved to only yesterday [Office 2000] a window pops up with: "name.xls cannot be accessed. The file may be resd-only, or you may be trying toaccess a read only location. Or, the server the document is stored on may not be responding." Older files stored on the same mediums ;HD, Flash memory or 3.5in. diskette are accessed with no problem. This is on a network drive? ...

users with restricted access
We have some users that we have directed to only get their information from a report that has been set up. Because of that, I set up a parameter query to make the information more easy to see. The parameter query prompts for last name or broker #, is there a way, when the last name is entered to include Jr's & Sr's? Or should this be another field in the table to make the last name field more accurate? ...

Queries and Charts
Does anyone know why the expressions in queries work fine for reports but not charts? ...

Access 97/2000/2003 comparisons
I have a rather large application that uses an access 97 database (DAO). We also have a version that works with access 2000, Oracle, msde, and SQLServer (ADO). We would like to retire the DAO version of the product, but there are places where the ADO version is much slower compared to where we run DAO seeks (very noticeable when looping). So, I have a few questions. 1. Are there any tips/tricks to speed up ADO queries to compare with DAO seeks? 2. Would there be any benifit in using access 2003 over previous versions of the software besides the added features (xml support, etc). 3...

Using later version of microsoft access
Hi, I've got access 2000 on my computer. When I go to open a database someone sent me I get an error message : this database is in an unrecognized format. The database may have been created with a later version of microsoft access. Is there any way I can open and use this file (short of upgrading to later version of access)? If you do not have Access 2002 or 2003, ask the person to save it in Access 2000 format for you. -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at m...

Outlook receiving zip files
Why is it when I try to send zipped files to my address; it gets returned as service unavailable? Hello Omar, your Exchange dont allow you to send this! Please speak with your Domain Admin "Omar" <anonymous@discussions.microsoft.com> schrieb im Newsbeitrag news:0754E7DA-31DC-4966-9FC1-C290A8D8222C@microsoft.com... > Why is it when I try to send zipped files to my address; it gets returned as service unavailable? Hi Omar, your Provider don�t supportet this part of file! -- Gestern lief noch alles, ich habe nichts gemacht! Bitte in der Newsgroup antworten, damit jeder d...

unable to read file #7
Does anyone know how to solve this error? This is the second time I have had the same error on the same file. Last time I was able to recover from a saved copy and updated fine. This time whenI opened the copy and updated it, then saved it, I got the same error when I tried to open it again, Now I don't have a good copy. I have downloaded all avaliable updates and tried running "Excel.exe /regserver>ok" This did not help. I also ran defran on the drive. "Randell" wrote > Does anyone know how to solve this error? This is the > second time I have had th...

SBS 2003 moving of users files
I run SBS 2003 and due to the amount of data on the users drive it has become chokers and have installed a new 1tb drive to keep up with demand for space. I need to move all the data to the new drive but unsure of the process. Is there an easy way of doing this? As it needs to be done asap Thanks -- JimmyJames ------------------------------------------------------------------------ JimmyJames's Profile: http://forums.techarena.in/members/255792.htm View this thread: http://forums.techarena.in/small-business-server/1357051.htm http://forums.techarena.in You c...

Importing AOL Email File Cabinet
Is it possible to tranfer a complete AOL Email File Cabinet into outlook? AFAIK, no, but see if anything here will do it: http://www.slipstick.com/config/convmsg.htm - check out Address Magic Plus first, it can convert almost anything. -- Diane Poremsky [MVP - Outlook] Need Help with Common Tasks? http://www.outlook-tips.net/beginner/ Outlook 2007: http://www.slipstick.com/outlook/ol2007/ Outlook Tips by email: dailytips-subscribe-request@lists.outlooktips.net EMO - a weekly newsletter about Outlook and Exchange: EMO-NEWSLETTER-SUBSCRIBE-REQUEST@PEACH.EASE.LSOFT.COM Outlook Tips: http:/...

no access to send internet email
Hi, Exchange 2003. Can a mail enabled user be restricted to send internal email only and not internet email? Nich Hello, > Exchange 2003. Can a mail enabled user be restricted to send internal email > only and not internet email? yes, that is possible. There are multiple ways to archive this goal. Depents on your infrastructure,too. If you have mailing to external over an SMTP Connector, try this: First look into your SMTP Connector, you will find Delivery Restrictions there. It is self explaining. If you have trouble with that or you won't find it, then i will need additi...

Changing query execution sequence
Hi all, I got a spreadsheet which would execute a bunch of queries. It's noted that the queries are executing in the sequence of when it was added to the spreadsheet. Does anyone out there know of a way to switch the order without deleting and recreating them? Thanks! Wing ...

140 MB file went to 5.08 MB after editting 1 table
Hello All - I need some ACCESS insight...please... Several years ago, I built an access db to track my business scheduling and accounts payable/receivable. So this database is EXTREMELY IMPORTANT TO ME. The file has grown to 140 MB. Today I made a copy of the file and then edited my calendar table. I removed all columns which had 2006 data (72 totals columns) - the table had about 144 columns originally. I then added 72 columns with 2008 headers. These columns are now blank since I have not added any 2008 data yet. Afterwards, I looked around and everything looks good - my 2007 data is the...

a few basic question about resource files
Hi, I have an application that uses resource files to contain the string values for each language. I have created the required resource files in my project, but I don't speak the languages I wish to have resources for. What I would like to do, is somehow allow the end user to edit the resource file themselves so they can set the string values as needed. Is there a way to edit the resource files that ship with my application and get installed ? or Is there a way to have external resource files (not embedded into my application) that can be updated/replaced with o...

Exporting contacts in a csv file
I am a mysterious problem exporting my contacts as csv file. The resulting file has only 58 contacts out of almost 1200 contacts in my outlook. These contacts appear to be the last 58 contacts added. (I say appear because the attribute "createdon" is not exported so I can't be exact. Why is this? cinnamngrl <cinnamngrl@gmail.com> wrote: > I am a mysterious problem exporting my contacts as csv file. The > resulting file has only 58 contacts out of almost 1200 contacts in my > outlook. These contacts appear to be the last 58 contacts added. (I > say appea...

is there a way to program my Excel file to do a loop?
Hi all, If I want B10 to B17 all follow the change of the same number(copy cell), let's say I put it in A1, and C10 follows the change of A2(copy cell), and C11 follows the change of A3(copy cell), and C12 follows the change of A4(copy cell), then I have 4 variables in my calculations: A1, A2, A3, A4. I want to loop each of the variables in a different set, then I hope the whole worksheet will be able to refresh following the change of A1, A2, A3, A4, and then I want to find the very set of A1, A2, A3, A4 that gives the smallest value of D10, how do I program the whole procedure...

Publisher can not save file
I recently started having troubles with my Publisher 2003. Whenever I go to save my files now, using save as or just the save button, it gives me a dialog box that says "Can not save file." It does that twice, then it disappears. I also noticed that when it does this, it leaves the .tmp files in the directory where I tried to save. I can change the name of the files, and sometimes it will save it. Most of the time not though. I have NAV, and I noticed that it was said there was an issue with Publisher and NAV. Is this the same with the 2005 version, and is this anything anyone...

Excel 2007 PC damages Mac Excel 2008 Files
Version: 2008 Operating System: Mac OS X 10.4 (Tiger) Processor: Intel When I open a Mac Excel 2008 file on Excel 2007 and I can work with the file, however when the file is returned to the Mac, it no longer works correctly, leading to a crash as soon as I try to save or eventually it might change the file to look like a bunch of letters and characters. Here is the error report: <br><br>Microsoft Error Reporting log version: 2.0 <br><br>Error Signature: <br> Exception: EXC_BAD_ACCESS <br> Date/Time: 2010-01-15 17:05:56 -0600 <br> Application N...