Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / May 2007

Tip: Looking for answers? Try searching our database.

Doing away with quotes in export file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
none - 03 May 2007 19:49 GMT
I am trying to export a file to .txt using TransferText.  My code
looks as follows:

<snippet>
DoCmd.TransferText acExportDelim, "Query1ExportSpecification",
"Query1", "c:\Test\" & sDocName
</snippet>

Now, when I export Query1 "manually" (File --> Export), I get a file
that looks like this (output file has one field):

(Smith) Anderson, Bill: nmt@nowhere.com
Baker, Bill: msb5@somewhere.com
Noel, Joe: nadmin@no.com

When, I use the code above, quotes are inserted in the beginning and
end of each entry, as such:
"(Smith) Anderson, Bill: nmt@nowhere.com"
"Baker, Bill: msb5@somewhere.com"
"Noel, Joe: nadmin@no.com"

I saved the settings for the "manual" export as
"Query1ExportSpecification", in which I specified that text qualifier
was set to {none}.

What do I need to do to get rid of the quotes?

Thanks!
none - 05 May 2007 00:30 GMT
I just wanted to follow up from this post and see if anyone had any
ideas?

Also, was there something wrong with the post?  Too easy of a
question?  Too confusing of a description?  Stumped you?

Thanks!!
Ken Snell (MVP) - 05 May 2007 00:36 GMT
What are you using as the delimiter -- a comma? Try changing to a character
that isn't in the text string.

Are you sure that the no qualifier choice was saved with the specification?

Signature

       Ken Snell
<MS ACCESS MVP>

>I am trying to export a file to .txt using TransferText.  My code
> looks as follows:
[quoted text clipped - 24 lines]
>
> Thanks!
none - 05 May 2007 02:13 GMT
I do not want a delimiter -- so I have selected {none}.  I am using
the same specification to generate the file manually that I do with
the TransferText.  I think.  :-)
Ken Snell (MVP) - 05 May 2007 02:19 GMT
There is no "none" option for the field delimiter. What is the field
delimiter character?

Signature

       Ken Snell
<MS ACCESS MVP>

>I do not want a delimiter -- so I have selected {none}.  I am using
> the same specification to generate the file manually that I do with
> the TransferText.  I think.  :-)
Ken Snell (MVP) - 05 May 2007 02:58 GMT
I just did a test of exporting a table that had commas in a field's values,
and selected "comma" as the field delimiter and "none" as the text
delimiter. Worked as expected -- no " character delimiting the field values.

Signature

       Ken Snell
<MS ACCESS MVP>

> There is no "none" option for the field delimiter. What is the field
> delimiter character?
>
>>I do not want a delimiter -- so I have selected {none}.  I am using
>> the same specification to generate the file manually that I do with
>> the TransferText.  I think.  :-)
none - 05 May 2007 04:49 GMT
Thanks for your help on this.  It looks like the specification file is
being ignored when I use the TransferText command. I have changed the
text delimiter and saved the spec file and the change is not reflected
when I run the code.  It works fine when I go to File --> Export and
chose the Specification file.

When you tried to do the export, what steps did you take?

Thanks!
Ken Snell (MVP) - 05 May 2007 05:11 GMT
I started doing a manual export so that I could create and save the
specification. After saving the specification, I canceled the manual export.
I then ran a TransferText macro to export the table and put the export
specification name as the Specification argument.

> Thanks for your help on this.  It looks like the specification file is
> being ignored when I use the TransferText command. I have changed the
[quoted text clipped - 5 lines]
>
> Thanks!
none - 14 May 2007 15:01 GMT
I wanted to give a conclusion to this topic.  As it turned out, there
was a problem with the MS Access file that I was working on.  I ended
up creating a new file, importing all of the tables, queries, etc, and
then was able to successfully perform the export through
DoCmd.TransferText acExportDelim .

Thanks to all for their help.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.