closefile

The closefile statement closes the current database.


Parameters

No parameters.


Description

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.

save
closefile

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.

setactivedatabase "Contacts"
closefile

Note: While this works for files with no visible windows, shared files are an exception. A shared file with no visible windows requires the use of save and closedatabase.

setactivedatabase "Contacts"  
save
closedatabase "Contacts"

See Also


History

VersionStatusNotes
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.