Sage Accpac 500 ERP (Version 5.3B)
I'm a programmer who occasionally does work for an AccPac consultant. Usually he provides me with a recorded macro to use as a template, but I don't have one this time.
Basically, I need to reconcile checks that have been cleared by the bank. He told me I need to update certain fields in the BKCHK table. I find when I try to do so I get errors saying this fields are read-only.
This is my essential code:
I assume what I am actually supposed to do is update some other set of fields, which will automatically change the "read-only" ones, but I don't know which ones I should.
Can anyone provide an example?
I'm a programmer who occasionally does work for an AccPac consultant. Usually he provides me with a recorded macro to use as a template, but I don't have one this time.
Basically, I need to reconcile checks that have been cleared by the bank. He told me I need to update certain fields in the BKCHK table. I find when I try to do so I get errors saying this fields are read-only.
This is my essential code:
Code:
Dim dbCompany As AccpacCOMAPI.AccpacDBLink
Set dbCompany = OpenDBLink(DBLINK_COMPANY, DBLINK_FLG_READWRITE)
Dim dbSystem As AccpacCOMAPI.AccpacDBLink
Set dbSystem = OpenDBLink(DBLINK_SYSTEM, DBLINK_FLG_READWRITE)
'Open the AccPac view to the Checks table
Dim vwChecks As AccpacCOMAPI.AccpacView
dbCompany.OpenView "BK0004", vwChecks
'...... Skip code where data is read from bank file....
'Look for a matching check number in the AccPac View
vwChecks.Init
vwChecks.Browse "BANK=""" & strBankCode & """ AND CHECK = """ & _
strCheckNum & """", True
'Update the Reconciliation Status, Date, etc.
vwChecks.Fields("RECCLEARED").Value = curChequeAmount
vwChecks.Fields("RECDATE").Value = datDatePaid
vwChecks.Fields("RECSTATUS").Value = 5
vwChecks.Fields("RECSTATCHG").Value = datDatePaid
vwChecks.Fields("RECYEAR").Value = strYear
vwChecks.Fields("RECPERIOD").Value = intPeriod
vwChecks.Fields("POSTDATE").Value = datDatePaid
vwChecks.Update
I assume what I am actually supposed to do is update some other set of fields, which will automatically change the "read-only" ones, but I don't know which ones I should.
Can anyone provide an example?