These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

messageBox issue

rpeterson
Registered: Oct 7 2008
Posts: 72

Hi all,
I am having a problem with the messageBox popping up twice. It is only referenced once, but its in the calculate event. I want the calculation to be contingent on the answer selected in the messageBox. Here is my script...

----- form1.Main_Subform.ItemSubform.PreservativeMass::calculate: - (FormCalc, both) ---------------

if(HasValue(form1.Main_Subform.ItemSubform.TissueMass.rawValue) & xfa.host.messageBox("Preservative to be added?","Question",2,2) == 4) then
form1.Main_Subform.ItemSubform.TissueMass.rawValue * 0.02
else
""
endif

I tried using a var in the enter event of the number field but that did not work. Can anyone give me some guidance?

thanks,
rpeterson

rpeterson

My Product Information:
LiveCycle Designer, Windows
rpeterson
Registered: Oct 7 2008
Posts: 72
Hey All,
I figured it out. I put the messageBox in the form initialize event. That fixed my issue.

rpeterson