Opening a document in a dialog box

If you want to open a document in a dialog box you can use two methods:

1° method

  1. in the form of the document create a table containing the visible part to users
  2. in the Queryopendocument event of the view from which you open the document, enter the code:

    where [form] is the form name created in the previous step and [title] is the title of the dialog box, set the second and third arguments to True and regard to the other arguments of the method dialogbox, you can refer to the help client designers.

If the view is an embedded view you can use the following code to get the main document:

In the form you can create buttons save, edit, etc. and if you want to add a Cancel button create a button with no code, but with properties set as shown in figure:


2° method

  1. in the form of the document create a table containing the visible part to users
  2. in the Queryopen event of the view from which you open the document, enter the code:

    The variable in the notes.ini myDialogBox is used to avoid running 2 times this event that would return the error “DialogBox can not be used from inside DialogBox”.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.