d94dsj 0 Posted July 22, 2002 Hi, I have a menu file with a button labelled "Close all files". This button just performs a "Close" script step, which makes the menu files' close script to run. This closing script performs a Close("File X") script step for each file in the solution (about 25). After these, FileMaker itself is shut down if no other file is open using a: If("PatternCount(DatabaseNames,"<Return character>")=0") Quit program End If The problem: When running this close script, I always end up with some files still open. When pressing the button a second time, all of the files close properly. It seems that some files are re-opened after having closed them one time. I know this can happen if you have layouts visible that have portals etc. or in other ways reference relationships, that cause files to re-open. But in this case I've tried "everything", i.e. minimizing all files, performing Freeze Window etc, everything to make any relationships NOT having to open files. But still, they re-open. What gives? Has anyone seen this behavious before? The environment is FileMaker 5.0/5.5 and mixed Windows 2000/Mac OS 9 environment. The problem occurs on both platforms. Thanks, Daniel Quote Share this post Link to post Share on other sites
bbaliner 0 Posted July 22, 2002 I'm having the same problem as I write. Try putting the script in a loop: Loop close all files on server Exit loop If("PatternCount(DatabaseNames,"<Return character>")=0") End Loop My problem is that each file has it's own closing script, and when I try to close all files from the menu file, it opens each file to run its closing script. It would be nice to have in Preferences->Application the option to close all files Good Luck Quote Share this post Link to post Share on other sites
bbaliner 0 Posted July 22, 2002 Actually, instead of sweating all the relationships, you can: 1. Specify to open your Menu file with defauslt password 2. Close the FileMaker app. All the files will automatically close. Quote Share this post Link to post Share on other sites