April 8, 200421 yr Can someone please share better way on closing a main database file plus any other related database files used? I have a database that uses/rely on 10 other different databases. My document is set to run a script when closing the main document to performs 10 different Closes [ ]; is there a better way? TIA -Deo FileMaker Version: 6 Platform: Mac OS X Panther
April 8, 200421 yr I use a script in my solutions where the other files get closed and the main file is closed last. I make sure the main document is displayed when the script runs so the user doesn't see the other files being closed. However, I do pop up a dialog box first, asking if the user wants to just close the solution or to exit out of FileMaker also. That way if the user has a different FileMaker solution running it doesn't get shut down unintentionally. If the user want to exit the solution, I use the Quit Application script step. If the user wants to close the solution and leave FileMaker up and running, I use only the Close[filename] step on each file. Show Message[Do you want to exit Filemaker too?] If [status( CurrentMessageChoice) = 3] <--- Cancel Exit Script End If If Status( CurrentMessageChoice) = 1] <--- No (just close files} Close[File B] Close[File C] Close[File D] End If If Status( CurrentMessageChoice) = 2] <--- Yes (Quit FileMaker) Quit Application End If Close[File A] <---Main File HTH, Mike
April 9, 200421 yr Author Mike, The Quit or Close Pop-up dialog option is a great idea I hadn't even considered, Thanks. I take it that there is really no way of closing other related files without defining each one in the close script. Oh, well... Thanks Again, I really appreciate you taking the time. Deo
Create an account or sign in to comment