Update

ACCPAC Common Controls

AccpacView.Update

Writes the contents of the existing logical record back to the database using the current key.

Sub Update()

Remarks

If the key fields have been altered, use the Insert method instead. If there are composite views, you must update them as necessary.

Example

The following example opens the rate type view CS0004, retrieves (reads) the rate type "SP", and changes the rate type description to "Daily spot rate" before updating the rate type record.
 

Dim CSRATETYPS1 As AccpacCOMAPI.AccpacView

mDBLinkSysRW.OpenView "CS0004", CSRATETYPS1

CSRATETYPS1.Fields("RATETYPE").Value = "SP"

Dim Status as Boolean

Status = CSRATETYPS1.Read

If Status = False Then

     Msgbox "The SP record does not exist."

     Exit Sub

End If

CSRATETYPS1.Fields("RATEDESC").PutWithoutVerification

("Daily spot rate")

CSRATETYPS1.Update