General information
Category:
Menus & Menu designer
>So, just tested a bunch of things. DOEVENTS in various places doesn't help. Neither does a wait of up to 5 seconds after exiting the modal form. I confirmed again that the form reference variable was null after the form closed, so I don't think this is a dangling reference.
>
>But, as I learned before, stepping through the code prevents the problem. I'm wondering if, rather than timing, the issue is having focus get set elsewhere before the other form opens. I just tried setting focus to something on the app's main form, and that didn't help. Wonder if I can set focus outside my app and then bring it back?
On a suggestion from the client, I modified the code in the button so that it doesn't hide the form before processing and that solved this. So apparently something about the combination of hiding the form, then introducing a wait state (or the calls to the COM object or something) caused the problem.
Thanks for the suggestions, folks.
Tamar
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only