Results 1 to 5 of 5
  1. #1
    tcheck is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    131

    $ Showing in TXT file but not in query

    I am exporting a query to a TXT file that is pipe delimited. I have about 15 fields in the query and all numbers must be fixed with no commas or dollar signs. When I run the query everything looks fine, but when I export the query to a text file, I have 2 fields that contain $ an ,'s. The fields are calculated like this;



    IIf([net_money]<0,[net_money]*-1,[net_money])

    When I view the file there are no dollar signs or commas, When I put them into a TXT file I get the fields with the formatting which I do not want. I am exporting the file using this command;

    DoCmd.TransferText acExportDelim, "Export_XXXX File", "qry_jXXXX", "J:\operations\PRD\Janus\" & Format(Date, "YYYYMMDD") & ".txt", True

    Export_XXXX is the Specification file.

    Any ideas?

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    In you query, have you exlicitly formatted each of those fields (select the field in the Query Builder, right click, and select Format)?
    Explicitly choose the format you would like.
    Now, try exporting the query manually and see if it turns out OK.
    If it does, try running it from your command and see if that works.
    If it works properly when exported manually, but not when done by your command, I think you need to rebuild your Export Specification.

  3. #3
    tcheck is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    131
    Thanks. I did format the fields to Fixed. I will try and rebuild the spec file.

  4. #4
    tcheck is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    131
    Went through the Import section in Access and found the Specification and edited it. The specification called for both of the 2 above fields to be currency. Changed it and not it works. Thanks.

  5. #5
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Changed it and not it works.
    I assume you meant "now it works", but if I assumed wrong, and the issue still isn't resolved, let us know.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 10-17-2012, 09:24 AM
  2. showing all values in query
    By dashingirish in forum Queries
    Replies: 13
    Last Post: 02-17-2012, 04:38 PM
  3. Query not showing all records
    By gazzieh in forum Queries
    Replies: 2
    Last Post: 02-17-2011, 08:11 AM
  4. Query Showing Non-Assigned
    By Flash76 in forum Queries
    Replies: 13
    Last Post: 02-03-2011, 01:40 PM
  5. Sql query not showing all the values
    By usr123 in forum Access
    Replies: 0
    Last Post: 02-24-2010, 07:32 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums