Roger Spencelayh
Guest
|
Posted:
Sun Nov 13, 2005 4:27 pm Post subject:
Re: .IIF import of invoices error |
|
|
| Quote: | I am having a problem importing invoice transactions into QB 2002 Pro
(UK) from .IIF file.
For each transaction I get message "Error on line n: Can't record
invalid transaction",
where n is the 'ENDTRNS' line.
|
Hi Martin.
You have my sympathies. I went through the process of trying to do the
same on QB 2005 for a client, and came to the conclusion that the help
files are at best misleading, at worst downright wrong.
Anyway, to your problem.
| Quote: | !TRNS TRNSTYPE DATE ACCNT NAME AMOUNT DOCNUM
!SPL TRNSTYPE DATE ACCNT NAME AMOUNT DOCNUM INVITEM
!ENDTRNS
TRNS INVOICE 10/28/2005 Accounts Receivable Bialystock and
Bloom 290 55b
SPL INVOICE 10/28/2005 Flights/Travel -290 Flights
ENDTRNS
|
Assuming that the format is the same for 2002 as 2005, you're missing
the transaction ID between the SPL and INVOICE fields. They need to be
just line numbers, so you data should look like:
!TRNS TRNSTYPE DATE ACCNT NAME AMOUNT DOCNUM
!SPL TRANSID TRNSTYPE DATE ACCNT NAME AMOUNT DOCNUM INVITEM
!ENDTRNS
TRNS INVOICE 10/28/2005 Accounts Receivable Bialystock and
Bloom 290 55b
SPL 1 INVOICE 10/28/2005 Flights/Travel -290 Flights
ENDTRNS
(!SPL and SPL lines changed)
Hope that helps.
Oh, one other thing, because I can't see from the message content, each
line should end with a single tab character. And never save it from
Excel as it ruins the format. If it's any help, below are the header
lines I created in the Access VBA code. It uses the FileSystemObject
text stream to build the file. (Watch for line wrap)
Set tstIIF = fso.OpenTextFile(strIIFFileFullName, ForAppending,
True, _
TristateFalse)
strLine = "!TRNS" & vbTab & "TRNSTYPE" & vbTab & "DATE" & vbTab
& _
"ACCNT" & vbTab & "NAME" & vbTab & "AMOUNT" & vbTab & _
"DOCNUM" & vbTab & "MEMO" & vbTab & "CLEAR" & vbTab & _
"TOPRINT" & vbTab & "ADDR1" & vbTab & "ADDR2" & vbTab & _
"ADDR3" & vbTab & "ADDR4" & vbTab & "ADDR5" & vbTab & _
"DUEDATE" & vbTab & "PAID" & vbTab & "SHIPDATE" & vbTab
tstIIF.WriteLine strLine
strLine = "!SPL" & vbTab & "SPLID" & vbTab & "TRNSTYPE" & vbTab
& _
"DATE" & vbTab & "ACCNT" & vbTab & "NAME" & vbTab & _
"AMOUNT" & vbTab & "DOCNUM" & vbTab & "PRICE" & vbTab & _
"QNTY" & vbTab & "INVITEM" & vbTab
tstIIF.WriteLine strLine
strLine = "!ENDTRNS" & vbTab
tstIIF.WriteLine strLine
--
Roger |
|
Bouncee
Guest
|
Posted:
Sun Nov 13, 2005 11:48 pm Post subject:
Re: .IIF import of invoices error |
|
|
Thanks for info, Roger.
I think SPLID is red herring - 2002 help doesn't say necessary.
What may well be problem is that there is no tab at end of any lines.
I'll try tab at end of !ENDTRNS and ENDTRNS.
Curiously though, no.of tabs at end of lines in web site sample (using
Notepad):
NONE for TRNS and SPL,
SEVENTEEN (!) for ENDTRNS.
Regards,
Martin Ball
|
|