Dear all,
I created a form which will open a data connection on a button click.
I catch the error on failure and code to close my form by app.execMenuItem("Close");
but a Save Dialog will appear before I can close it.
(may be because I have done something on opening the form),
is it able to suppress it? Or simply cannot?
Best Rgds.
Solved! Go to Solution.
Views
Replies
Total Likes
Hmmm,
what if you add?
event.target.dirty = false;
app.execMenuItem("Close");
Views
Replies
Total Likes
Hi,
you can use
event.target.closeDoc(true);
This will close the doc without prompting the save as dialog.
Views
Replies
Total Likes
but it seems that after event.target.closeDoc(true);
the codes that follow will continue to run,
but this doesn't happen if I use app.execMenuItem("Close");
I already include the closeDoc inside the try catch.
Views
Replies
Total Likes
Hmmm,
what if you add?
event.target.dirty = false;
app.execMenuItem("Close");
Views
Replies
Total Likes
Thanks Radzmar, it works!
Rgds.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies