5 Replies Latest reply on Aug 6, 2014 8:24 AM by NicoleCiemniak

    Database/file immidiately closes upon being opened

    NicoleCiemniak

      Title

      Database/file immidiately closes upon being opened

      Post

           After making what seemed like a benign change, my database file closed, and when I try to reopen the file, it opens again for half a second and then closes again. Notably, the FileMaker program itself does not crash.

           I set a script containing only the commands, "Show all records" and "Sort Records" to run On Layout Enter, which seemed to be the last change that I made before it started closing like this. Does anyone know of a way to make it so that the file does not immediately close, so that I can make changes and figure out what the issue is? I realize this is not a normal filemaker issue, but I am hoping someone might have an idea!

           (Note: I am using FileMaker Pro 11)

        • 1. Re: Database/file immidiately closes upon being opened
          RickWhitelaw

               What OS are you running? If Mac, hold down "Command" and "." as the file opens. This will stop the script that runs OnLayoutEnter. I assume you've specified a default layout in File Options.

          • 2. Re: Database/file immidiately closes upon being opened
            philmodjunk

                 Use the Esc key in windows.

                 But you might also want to use recover on the file to check it for damage. That closing could be a crash due to damage to your file.

                 And if you have FileMaker Advanced, launch Advanced without opening this file, enable the script debugger and then open the file. You'll be able to se exactly what your script is doing and be able to use the red X button to halt the script before it closes the file so that you can fix the script that is closing it.

            • 3. Re: Database/file immidiately closes upon being opened
              NicoleCiemniak

                   I'm controlling my computer remotely right now (Windows controlling Mac), and I've tried Command + "." (and I did indeed make sure the keyboard mapping worked correctly before that). It didn't work, I'm hoping to try some other shortcuts tomorrow to see if I can cut off whatever script may be running when I can access my computer directly. I'm hoping that the only reason it's not working is because of a delay from accessing it remotely, though it's unlikely. I did previously try to recover the file, though it told me there were no problems and the recovery itself did nothing. And sadly,  I do not have FileMaker Advanced! Hopefully I'll be able to find a way around it without having to resort to buying it. Thanks to both of you for the input! I'll let you know how it goes.

              • 4. Re: Database/file immidiately closes upon being opened
                philmodjunk

                     User aborts can be disabled for a script. If that's the case here, the trick is to create a new database file and set up a script in the new file that performs some script other than the OnFirstWIndowOpen performed script in the original file. You can then run the script in your new file and find the original file open in the background by pulling down the windows menu and checking the "Show" sub menu.

                • 5. Re: Database/file immidiately closes upon being opened
                  NicoleCiemniak

                       Finally figured it out, thank you for all the suggestions they helped so much! I ended up opening up a different FileMaker file in the background, and then opened the file that wasn't working, which seemed to slow it down enough that I had time to abort the script using Command + ".". Turns out I had set a script On Exit Layout that included the commands "Close Window" and "Halt Script" at the very end. Useful for the layout's usual purposes (it's usually set to open in another window), but horrible when I have the layout open in the main window. Not to worry, I've got it fixed now so that it only closes when it's open in a separate window. Thanks again!