Dear Don, Abhilash and Jamie,
Thank you so much for taking your time to response my query.
Long long time ago I was a VB programmer and now I want to use CR to communicate with Simply Accounting (I am an accountant now). So I think it is better to use the basic syntax.
I tried the code as Jamie suggested and it works. However what I want to do is to assign the variable formula to a table variable such as Journal_Entry.Amount . Then I tried several methods (for exampe {Journal-Entry.Amount} = formula) and none of them are correct. After I searched the help of CR and googled the Internet, I did not find out any solution.
All the best