Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 8035 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi,

is there a way to make sure a related db is open, and stays open? I mean, can i abort opening a solution when the preferences.fp5 is missing or misplaced?

TIA

JP

Posted

Use the design function DatabaseNames


If [PatternCount(DatabaseNames,"Preferences.fp5")=0]

  * File is closed or missing so put your abort routine here

Else

  * File is open so continue with your application

End If

Posted

Or create a startup script that opens all the files and check for errors...

Allow User Abort

...

Set Error Capture [on]

Perform Script [external, open script in file 1]

If [status(CurrentError) <> 0

Show Message [ "File 1 could not be opened."]

Exit Application

End If

Perform Script [external, open script in file 2]

If [status(CurrentError) <> 0

Show Message [ "File 2 could not be opened."]

Exit Application

End If

Perform Script [external, open script in file 3]

If [status(CurrentError) <> 0

Show Message [ "File 3 could not be opened."]

Exit Application

End If

... etc.

(The IFs could be nested with Else steps if you prefer.)

This topic is 8035 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.