balooka Posted January 19, 2003 Posted January 19, 2003 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
BobWeaver Posted January 20, 2003 Posted January 20, 2003 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
Vaughan Posted January 20, 2003 Posted January 20, 2003 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.)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now