Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    330
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Creating a text file (access 2003(2000mode))

    Hi all,

    This may not be the right place for this but I am doing it via access so here goes.

    I am attempting to create a Quickbooks iif file for import and the information fields are separated with tabs.

    How do I create a TAB when I create the file. Print#1 "yes"; tab;"no" creates a set spacing, but there are 8 or 9 actual spaces in the gap, not a single tab space which I need. How can I do it?

    It's the last part of the puzzle!
    "Heading for the deep end"

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Creating a text file (access 2003(2000mode))

    I don't know what an iif file is, but if you are exporting a table or query, you can export it directly to a tab-delimited file. Export it once manually. The wizard will let you specify Tab as delimiter and other settings. Just before clicking Finish in the wizard, click Advanced.., then Save As... to create a named export specification. You can then use this in the SpecificationName argument of DoCmd.TransferText.

    If you need to assemble the text file line by line, specify the entire line as a single concatenated string; you can use vbTab to produce a tab character:

    <code>Print #1 "yes" & vbTab & "no"</code>

  3. #3
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    330
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Re: Creating a text file (access 2003(2000mode))

    Hans,
    Thankyou very much for the info. I don't do this often enough to remember little things like that, but I had an inkling that it was something like that. An iif file is an export/import filetype used by Quickbooks. It's just a particularly laid out text file and I am building it line by line.

    Thanks again.
    "Heading for the deep end"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •