The closefile statement closes the current database.


No parameters.


This statement closes the entire database associated with the active window when the statement is triggered. As a result all windows for this database will also close.

Note: Closing the database does not stop the procedure. If the procedure has additional steps it will continue running. For example a procedure can close the current database and then open another one.

Warning: This statement will not automatically save the database it is closing. If you want the database to be saved before closing, you should use the save statement just before the closefile statement.


This is different than Panorama 6 and earlier versions, which in some cases would prompt the user to ask him or her if they want to save.

If you want to close a different database than the current top window, use the setactivedatabase statement first. This example will close the Contacts database, even if it is not the currently active database (it could even be invisible with no windows).

setactivedatabase "Contacts"

See Also


10.0UpdatedCarried over from Panorama 6.0, but no longer prompts the user to ask if they want to save changes if it is the last statement in the procedure.