Easy to Create, Easy to Change - Easy to use!

Function::Action

DocumentClose

DocumentClose() retval:=DocumentClose() DocumentClose("Name") -- Will close document with TITLE i.e. what you see on titlebar/Tab and not documentname as name. ex. DocumentClose("DESIGN FORM : MyForm") will close Window which contain MyForm in Design view. (DE9 onwards) DocumentClose("WinID") -- will close specific Window by ID. ID can be obtained with GetCurrent("ActiveWindow") or Action: GETALLWINDOWTITLES (DE9 onwards)

Closes the current document.

Parameters


Text

Returns/Result


Status: integer

Examples


Examples 1: Save record and close.

RecordSave()+DocumentClose() -- this might cause GPF because the form close before it is saved (big form) so alternative is to include a wait.
RecordSave()+wait(0.1)+DocumentClose()

Reference

See Also


On the forum about DocumentClose

documentclose , openform, refreshform

I always get errors, what is wrong? see the attacment. I want a to clear the Form "AUFTRAG" but not ClearForm(), but ClearForm("AUFTRAG") from a button in a second document....

Product: Dataease [{8}]FIVE. Written by Rainer 23/06/19 at 10:49:29

Re:documentclose , openform, refreshform

Hallo Rainer,habe dein Problem gesehen.. Ich denke bei der Anweisung Wait(0.1) musst Du einen Punkt und kein Komma verwenden! :) Grüße aus dem Rheinland....Markus...

Product: Dataease [{8}]FIVE. Written by grohmann.papier@t-online.de 23/06/19 at 20:22:37

Re:documentclose , openform, refreshform

Ahh sorry ... Und müsste es nicht FormClear sein ?.....Gruß Markus...

Product: Dataease [{8}]FIVE. Written by grohmann.papier@t-online.de 23/06/19 at 20:31:56

Re:Re:documentclose , openform, refreshform

Danke, it is much easier +documentclose()+refreshform() that works...

Product: Dataease [{8}]FIVE. Written by Rainer 23/06/19 at 22:06:41

Re:documentclose , openform, refreshform

All numbers in programming need to be in "English" i.e. .(period) rather than , (comma). This was changed in 7.2 so code would not be affected by windows settings. Compied code was never affected but actions (i.e. button code) is interpreted so it wou...

Product: Dataease [{8}]FIVE. Written by DataEase 25/06/19 at 13:02:19

On the blog about DocumentClose

New Function in 8 - DocumentCloseName() - Close a named document remotely (Ver. 8.1.1.1444)

First new function in a while, but one of many to come.We are opening up DE8 from a programmers perspective and we want to give the programmer as much control as possible on how the application is managed and behave.All of us that has t...

Product: Dataease [{8}]FIVE. Written by DataEase 15/01/14 at 09:14:10