Rick Edwards Posted November 26, 2001 Share Posted November 26, 2001 Is there a way to check to see if a file is open and if not open it? Thanks. -Rick Quote Link to comment Share on other sites More sharing options...
blackcat Posted November 26, 2001 Share Posted November 26, 2001 Rick I always ensure that all files are opened anyway on startup by the first file using a startup script that includes the open command to all the relavent files. However, If someone opens the wrong file by mistake it doesn't really matter as any 'related' files automatically open anyway when data in that file is requiered to be displaed within the file just opened. Have I missed your point? Quote Link to comment Share on other sites More sharing options...
Rick Edwards Posted November 26, 2001 Author Share Posted November 26, 2001 I'm running a stand alone database with a main page and seperate template files which have a button attached to close themselves. The problem is if the template happens to be the only file open when it closes, it quits the entire thing. I'd like to be able to check to see if any other file is open and if not to open the main page file. I hope this is a clear explanation. Quote Link to comment Share on other sites More sharing options...
birdman Posted November 26, 2001 Share Posted November 26, 2001 Try using the design function called DatabaseNames. This will give you a list of all files that are open. You could then run a test on the filenames returned to do the sequence you wish. Hope this helps. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.