sflynn Posted December 5, 2006 Posted December 5, 2006 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!
aldipalo Posted December 5, 2006 Posted December 5, 2006 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.
sflynn Posted December 9, 2006 Author Posted December 9, 2006 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?
Genx Posted December 9, 2006 Posted December 9, 2006 (edited) 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, 2006 by Guest
sflynn Posted December 17, 2006 Author Posted December 17, 2006 thanks for that. I'll give it a try. Cheers.
Recommended Posts
This topic is 6553 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