Record Variable as a Function Parameter

Hi, I think there’s something I didn’t understand correctly: if I call an external function with a variable of type record by reference (VAR check=TRUE) and the external function does some changes on the abovesaid variable, souldn’t the changes show also in the calling object, even if the record variable isn’t saved in the database? Anna

Yes it should [:D] Are you getting a error message?

Anna Perotti, Normally, In function if you change the value of a record without the coding “VarRec.Modify” (after you assign the value for other fields) the record will not change. But that is different if you change the record which is linkage to a form. For example : if you are in customer card and pass the “Rec” to a global function, and you can write this code “CurrForm.Update” (after you assign the value for other fields), then the record will change also. Normally if a record change without “VarRec.Modify” then value in the record will not change.

Citazione:

Yes it should [:D] Are you getting a error message?
Originariamente inviato da Hhelgesen - 2004 Nov 24 : 18:08:52

No. Actually, I was blaming on the system an error of mine! [:O)] The changes didn’t show in the calling object because a silly part of the code did restore the previous values just before sending the variable back… Sorry! [:I] Thank you all for the assistance. [:)] Anna