Form cannot close ...

Hi, people. Can anybody tell me what might cause the message “Form xxxx cannot close because the system is currently working”? I’ve a form that executes some calculations in the OnPush trigger of the OK button; I had to ask the user for directions and added a simple CONFIRM line. After I did that the form behaviour has changed in the following way: 1) Press OK on the form 2) A message box appears showing the abovesaid message 3) Press OK on the message box 4) The Confirm box appears 5) The Confirm box is answered by pressing Yes or No 6) The code in the trigger is normally performed according to the given Yes/No answer 7) The form normally closes [?] Anna

Anna, Take a look at the PushAction on the button…Normally this message appears when you have an action here (which tries to close the form) and then try to process code. If you have a PushAction of OK, then the system tries to automatically close the form. In your case it can’t close the form as it is waiting on User input.

quote:


Originally posted by chrisk
Anna, Take a look at the PushAction on the button…Normally this message appears when you have an action here (which tries to close the form) and then try to process code. If you have a PushAction of OK, then the system tries to automatically close the form. In your case it can’t close the form as it is waiting on User input.


Thank you. You are right. [:)] What is still confusing me is that I didn’t add the code in the trigger, just the CONFIRM box and a couple of lines to carry on the user’s choice, but most of the code, which performs a lot of calculations and writes some tables, was already there. So why that message didn’t come out before? Problem is solved, anyway. Thank you again. [:D] Anna

The simplest explanation (still confusing) is that without the CONFIRM, the code will run and the form can close without waiting. With the CONFIRM, the form has to yield processing to the CONFIRM box and the PushAction doesn’t like to wait. It’s almost like the two code streams are happening at the same time. [:(!] Good to hear it’s working now.