updating record in a form

Hey all, when i load a record into a form, i have some code in the “OnAfterGetCurrRecord”, which calculates some data for this customer. The results should be stored in the same record, hence i have added a MODIFY. This doesn’t work (i get the error message “the database can’t be altered in this trigger” (i have translated it from the german version, so the message may look a little different in your version)). But, where do i have to add the modify-command, if i want to update the record asap after beeing loaded ? thanks in advance

Hi Stefan I think you can write the code on the ‘OnAfterGetRec’. but the form will be closed if you have any errors in the code in this trigger. regards MK

Hey MK, i’ve tried there too, but no success. I added it at the OnModifyRecord-trigger as well, but if there is no manual change in the record it won’t be saved. Entering the modify-command in an other trigger makes no sense to me. But how can i save the values Javascript:insertsmilie(’[?]’) Question [?]Javascript:insertsmilie(’[V]’) Disapprove [V]

Hi Stefan sorry ya, yep i checked that even that trigger doesnt work. According to my tests i think it is not possible. But what you can do is, i donno if this works. I suppose that you r running the form from a command button or a menu button, if so then why dont u modify the record and then run the form, using either runmodal or run functions of form. Hope it helps u. Regards MK