Hi,
I have problem with my script, I'm not able to sote in a table the calucated field from a form. (form based on a set)
This is the script:
'Set 'Value' property of multiple objects in Form 'frm_Invoice' .
DIM form_name as c
if is_object(topparent.this) then
form_name = topparent.name()+".this"
else
form_name = ""
end if
DELETE expression_result
expression_result = eval("Tbl_Invoice_Totali->Gran_Total",form_name)
parentform:Grand_total.value = expression_result
DELETE expression_result
expression_result = eval("Tbl_Invoice_Totali->Tot_Vat",form_name)
parentform:Amt_tax.value = expression_result
DELETE expression_result
expression_result = eval("Tbl_Invoice_Totali->Tot_Discount",form_name)
parentform:Amt_disc.value = expression_result
DELETE expression_result
expression_result = eval("Tbl_Invoice_Totali->Totali",form_name)
parentform:Total.value = expression_result
DELETE expression_result
expression_result = eval("Tbl_Invoice_Totali->Invoice_Number",form_name)
parentform:Invoice2.value = expression_result
I insert this script onto the 'CanSave EVENT' of my form .
and this is the error that I receive :
Script:CanSave line:16
parentform:Grand_total.value = expression_result
Field types don't match
I have check the fields and they are the same type.
Can you tell where I wrong ?
Thanks
I have problem with my script, I'm not able to sote in a table the calucated field from a form. (form based on a set)
This is the script:
'Set 'Value' property of multiple objects in Form 'frm_Invoice' .
DIM form_name as c
if is_object(topparent.this) then
form_name = topparent.name()+".this"
else
form_name = ""
end if
DELETE expression_result
expression_result = eval("Tbl_Invoice_Totali->Gran_Total",form_name)
parentform:Grand_total.value = expression_result
DELETE expression_result
expression_result = eval("Tbl_Invoice_Totali->Tot_Vat",form_name)
parentform:Amt_tax.value = expression_result
DELETE expression_result
expression_result = eval("Tbl_Invoice_Totali->Tot_Discount",form_name)
parentform:Amt_disc.value = expression_result
DELETE expression_result
expression_result = eval("Tbl_Invoice_Totali->Totali",form_name)
parentform:Total.value = expression_result
DELETE expression_result
expression_result = eval("Tbl_Invoice_Totali->Invoice_Number",form_name)
parentform:Invoice2.value = expression_result
I insert this script onto the 'CanSave EVENT' of my form .
and this is the error that I receive :
Script:CanSave line:16
parentform:Grand_total.value = expression_result
Field types don't match
I have check the fields and they are the same type.
Can you tell where I wrong ?
Thanks
Comment