December 5, 200619 yr Can anyone give me advice. I'm trying to find a clean way to launch and close my database. I have a window that I use to select from a projects list that always needs to be open. And I want the database to always close down and open up with that window as the only one there. Are there any best practices people use to get in and out of a dbase? I'm trying different methods but it seems pretty messy and inconsistent. Any help is greatly appreciated!
December 5, 200619 yr Why not set up a start up script? You can open only the window(s) and/or tables you wish. You can also have a Close script that will close all files as well as make back ups.
December 9, 200619 yr Author I get that part. But I'm having trouble writing a script that sorts through all the windows and closes them.... you can't predict what window someone might open despite your best efforts to keep in under control. What kind of script would you write that no matter what would close the ones you don't want, and leave open the one you do?
December 9, 200619 yr This should work... though i'm not thinking very well today so i can't be sure -- test it out. Allow User Abort[off] Set Error Capture[on] Freeze Window SetVariable[ $n ; 2 ] SetVariable[ $windows ; Substitute( ¶ & WindowNames & ¶ ; "¶The Window You want kept open here¶" ; ¶ ) ] Loop Exit Loop If[ $n > valueCount($windows) ] Select Window[ Name: GetValue( $windows ; $n ) ; CurrentFile ] If[ Get(LastError) = 0 ] Close Window End If SetVariable[ $n ; $n + 1 ] End Loop Edited December 9, 200619 yr by Guest
Create an account or sign in to comment