Every time you open dQuery, you’ve got a brand new dataModule to work with. Alternatively, you can double-click on “Untitled” in the dataModule tab of the Navigator, or select File | New | DataModule from the dQuery Main Menu.

To open an existing dataModule - select File | Open. Select the desired dataModule and click "Open", or Double-click on the desired dataModule in the DataModule tab of the Navigator.

A dataModule can be saved by:

  1. Selecting File | Save from the Main Menu

Creating business rules in a dataModule

Besides writing event handlers for the components in a dataModule, you can code methods directly in the source file for a dataModule. These methods can be applied to the forms that use the dataModule as business rules. For example, you might write a procedure to perform month-, quarter-, or year-end bookkeeping. You might call the procedure from an event handler for a component in the dataModule.