I've got a VBA script which inserts A/R invoices into ACCPAC 5.5. Works fine over the last four years for two databases (was tweaked as ACCPAC was updated). Now a third database has been set up and I get this error when inserting an invoice detail line: Tax class 0 is not in the range of 1 through 10.
Code:
ARINVOICE1detail1.Init
ARINVOICE1detail1Fields("IDACCTREV").Value = CStr(rsInvoiceDetail.Fields.Item(1).Value) ' Revenue Account
ARINVOICE1detail1Fields("AMTEXTN").Value = CStr(rsInvoiceDetail.Fields.Item(0).Value) ' Extended Amount w/ TIP
ARINVOICE1detail1.Insert
I've never had to do anything with tax classes before. The only tax-related code I have appears before the above snippet:
ARINVOICE1headerFields("CODETAXGRP").Value = "GPST"
Any ideas on what is going wrong here?
Code:
ARINVOICE1detail1.Init
ARINVOICE1detail1Fields("IDACCTREV").Value = CStr(rsInvoiceDetail.Fields.Item(1).Value) ' Revenue Account
ARINVOICE1detail1Fields("AMTEXTN").Value = CStr(rsInvoiceDetail.Fields.Item(0).Value) ' Extended Amount w/ TIP
ARINVOICE1detail1.Insert
I've never had to do anything with tax classes before. The only tax-related code I have appears before the above snippet:
ARINVOICE1headerFields("CODETAXGRP").Value = "GPST"
Any ideas on what is going wrong here?