Hello,
I'm using Accpac 5.5 and trying to create a bank entry.
I've used a macro as a basis although I am getting the following error:
Here is some of my code.
I did come across thread631-1552567. It's similar but different.
Any suggestions would be greatly appreciated.
Thanks.
If at first you don't succeed, then sky diving wasn't meant for you!
I'm using Accpac 5.5 and trying to create a bank entry.
I've used a macro as a basis although I am getting the following error:
Bank code has a different value than the header does.
Here is some of my code.
Code:
baDBLink.OpenView "BK0001", BKACCT
baDBLink.OpenView "BK0007", BKENT
BKACCT.Compose Array(Nothing, Nothing, Nothing, Nothing, BKENT, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing)
BKENT.Compose Array(BKACCT, Nothing, Nothing, Nothing)
BKENT.Browse "(RECONCILED = FALSE)", 1
BKACCT.Fetch
With BKENT
.RecordClear
.RecordCreate 0
.Fields("POSTNOW").value = 1 '// 1 = yes.
.Fields("BANK").value = l_strBankCode '// Bank Code.
.Fields("DATE").value = DateSerial(Year(Date), Month(Date), Day(Date))
If l_dblTotalAmount < 0 Then l_dblTotalAmount = l_dblTotalAmount * -1
.Fields("AMTDR").value = l_dblTotalAmount ' Debit Amount
.Fields("GLACCOUNT").value = l_strAcctArray(i) ' G/L Account
.Fields("REFERENCE").PutWithoutVerification (DateSerial(Year(Date), Month(Date), Day(Date))) ' Reference
.Fields("COMMENT").PutWithoutVerification ("Rapid Import") ' Description
' .Fields("BIGCOMMENT").PutWithoutVerification ("test comm") ' Comments
' .Fields("RECYEAR").value = 2013
' .Fields("RECPERIOD").value = 5
.Insert [red]<------ ERROR[/red]
.Fields("UNIQUE").PutWithoutVerification ("-1") ' Entry Uniquifier
.Read
.Update
End With
I did come across thread631-1552567. It's similar but different.
Any suggestions would be greatly appreciated.
Thanks.
If at first you don't succeed, then sky diving wasn't meant for you!