Hi Edy,
Thank you for the response. I tried to wrap the code in a try-catch block, but it didn't work. The value could not be set to the EditText.
I finally got this to work by disable this EditText before setting the cfl value to it. I don't know why but it works. And I don't know what other problems might cause.
m_oForm.Items.Item(TXT_TEMPLATE).Enabled = false;
m_oForm.Items.Item(TXT_TEMPLATE).Specific.Value = templateID;
Thanks
Helen