LOCAL lnotes, lnotescurrent, ddDate, cDateStr, dDate ddDate = DATETIME( ) cDateStr = TRANSFORM(DAY(ddDate)) + " - " + UPPER(LEFT(CMONTH(ddDate),3)) + ; " - " + SUBSTR(TRANSFORM(YEAR(ddDate)),3) lnotescurrent = THISFORM.edtNotes.VALUE lnotes= cDateStr + CHR(13) + CHR(10) + ALLTRIM(lnotescurrent) THISFORM.edtNotes.VALUE = lnotes UPDATE investmentadvisor SET notes = lnotes ; WHERE managercode = pMgrCodeThe reason your replace errors is that you have the syntax wrong, change it as follows;
* Change from this REPLACE notes WITH (lnotes)+chr(13) ; WHERE managercode =(pMgrCode) * To this REPLACE notes WITH lnotes + chr(13) + CHR(10) ; FOR managercode = pMgrCode