Hi all
My VB6 program made to enter PO Invoices from RCP form is returning "Referenced memory at 0x0000000c could not be read" error on line << PORCP1header.Update >>. This was working in A4W 55A. I just changed it to point to A4W 60A.
Please help me figuring out what is wrong in my code.
Thanks
My VB6 program made to enter PO Invoices from RCP form is returning "Referenced memory at 0x0000000c could not be read" error on line << PORCP1header.Update >>. This was working in A4W 55A. I just changed it to point to A4W 60A.
Please help me figuring out what is wrong in my code.
Code:
With rsTrans
While (Not .EOF)
PORCP1header.Order = 1
PORCP1header.Order = 0
PORCP1headerFields("RCPHSEQ").PutWithoutVerification ("0") ' Receipt Sequence Key
temp = PORCP1header.Exists
PORCP1header.Init
PORCP1header.Order = 1
temp = PORCP1detail1.Exists
PORCP1detail1.RecordClear
temp = PORCP1detail3.Exists
PORCP1detail3.RecordClear
temp = PORCP1detail4.Exists
PORCP1detail4.RecordClear
temp = PORCP1detail6.Exists
PORCP1detail6.Init
temp = PORCP1detail2.Exists
PORCP1detail2.Init
PORCP1headerFields("RCPNUMBER").Value = !RCPNUMBER ' Receipt Number
temp = PORCP1header.Exists
PORCP1header.Read
temp = PORCP1detail6.Exists
PORCP1detail6.Init
PORCP1detail6Fields("RCPRREV").PutWithoutVerification ("-999999999999999999") ' Line Number
PORCP1detail6.Browse "", 1
PORCP1detail6.Fetch
temp = PORCP1detail2.Exists
PORCP1detail2.Init
PORCP1detail2Fields("RCPCREV").PutWithoutVerification ("-999999999999999999") ' Comment Identifier
PORCP1detail2.Browse "", 1
PORCP1detail2.Fetch
PORCP1detail3.Browse "(RCPHSEQ = " & !RCPHSEQ & ")", 1
temp = PORCP1detail3.Exists
PORCP1detail3.RecordClear
PORCP1detail3.Browse "(ISPRIMARY = ""0"")", 1
PORCP1headerFields("INVNUMBER").Value = !NEWINVNUM ' Invoice Number
PORCP1detail3.Browse "", 1
PORCP1detail3Fields("VDCODE").PutWithoutVerification ("") ' Vendor
PORCP1detail3.Browse "(RCPHSEQ = " & !RCPHSEQ & ")", 1
temp = PORCP1detail3.Exists
PORCP1detail3.RecordClear
PORCP1detail5Fields("FUNCTION").PutWithoutVerification ("10") ' Function
PORCP1detail5.Process
temp = PORCP1header.Exists
PORCP1header.Update
'PORCP1detail5Fields("RCPHSEQ").PutWithoutVerification ("'" & !RCPHSEQ & "'") ' Receipt Sequence Key
PORCP1detail5Fields("RCPHSEQ").Value = !RCPHSEQ ' Receipt Sequence Key
PORCP1detail5Fields("FUNCTION").PutWithoutVerification ("2") ' Function
PORCP1detail5.Process
PORCP1header.Read
Trfnr = Trfnr & "; " & !NEWINVNUM
.MoveNext
Wend
End With 'rs