January 19, 200322 yr 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
January 20, 200322 yr 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
January 20, 200322 yr 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.)
Create an account or sign in to comment