How it works...

When the user clicks New (or the form is opened with a menu item that has Open Mode set to Yes), the form triggers a task that calls the current data source's Create method. In our case, we must let the data source do this; however, at this point, we will open the create dialog using the create method we wrote on the form handler.

The create method is a standard way to call any form from code. Never use the form name as a string literal without using an intrinsic function; in this case, formStr.

This calls the create dialog that is set up so the normal form events no longer fire. We will initialize the form from the form handler class in order to pass back the new record.

Once control returns back to our details form, we will replace the data of the record with the record created by the create dialog; this was done in the data([Common]) method.

The key activities can be seen in this diagram:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.95.150