I have code that runs on a button from a form (let's call it form A) that is comparing data from a quickbooks import with data in anothe alpha table. The code calls form B in dialog mode, hidden, then I set some fields on the form with data from the quickbooks import, and then activate the form and then show it, because I need the user to process form B before continuing with the script on form A. The script on form A is actually a while loop, that goes back and gets the next record from the import table.
I noticed that form B was not actually being closed by the "close" command on form B's "close" button, although the script on form A does continue when you return from form B.
After investigation, I found this thread http://msgboard.alphasoftware.com/al...ing+modal+form on the message board, talking about the same issue. It was pointed out that you had to close form B a 'second" time, in the code on the calling form (A), otherwise form B was still in memory. Still not quite sure why that is, but none the less I added code to form A as suggested in the thread, to close form B, in the script on form A where it resumes once you return from form B, and that closes the form successfully.
So far so good. But the problem is, when I call form B again from my "while" loop, to process the next record from the import table, it does not open properly - I open the form again, using completely standard code for opening a form in dialog mode, but the pointer to the form object is blank.
I won't have time to develop a postable version of the code until the weekend, but I wondered if anyone could respond with any idea what is wrong.
I noticed that form B was not actually being closed by the "close" command on form B's "close" button, although the script on form A does continue when you return from form B.
After investigation, I found this thread http://msgboard.alphasoftware.com/al...ing+modal+form on the message board, talking about the same issue. It was pointed out that you had to close form B a 'second" time, in the code on the calling form (A), otherwise form B was still in memory. Still not quite sure why that is, but none the less I added code to form A as suggested in the thread, to close form B, in the script on form A where it resumes once you return from form B, and that closes the form successfully.
So far so good. But the problem is, when I call form B again from my "while" loop, to process the next record from the import table, it does not open properly - I open the form again, using completely standard code for opening a form in dialog mode, but the pointer to the form object is blank.
I won't have time to develop a postable version of the code until the weekend, but I wondered if anyone could respond with any idea what is wrong.
Comment