4 Replies Latest reply on Jul 21, 2014 4:16 PM by davidanders

    Database Startup



      Database Startup


           I have a small database file that I use to launch the real one using a script:

           Open File ["MainDatabase"]

           Close File [Current File]

           Works fine, but the problem is when the MainDatabase file loads, it asks for user name and password.  If a user clicks "Cancel" they are presented with and error indicating "Open File has been canceled. Do you wish to continue with this script".  If they click continue, it opens up the filemaker quick start menu, no good.  If they click cancel, they are left sitting on the startup database that contains the aforementioned script.  I need a way to deal with this.  If the user hits cancel, I simply need filemaker to quit.

           Is there a way to use Error Capture to deal with this?




        • 1. Re: Database Startup

               Are you using set error capture [on]& allow user abort off?

          • 2. Re: Database Startup

                 No, it's literally the two lines as show above!

            • 3. Re: Database Startup

                   Ok, I put allow user abort off at the start of the script, that works, closes the database, but still shows the quick start menu.  I would actually like filemaker to close so they can't go in and open a file through recents in the quickstart.  Also, how do I now get into the initial files script to edit it, before the second file loads.


              • 4. Re: Database Startup

                     Windows - SHIFT key
                     Mac - COMMAND key


                     If you have a Mac system and you can hit the buttons fast enough and the script does not disable user aborts, you can press command-period to halt any currently executing script---such as the start up script. On windows systems, the Esc key does the same job.

                     If you have FileMaker Advanced, do this:
                     Launch FileMaker without opening your file.
                     Select the script debugger from the tools menu.
                     Now use the file menu to open your file--entering a password if asked to do so.

                     The file will open and halt on the first script step. You can then click the red X in the debugger to halt the script--even if user aborts have been disabled.