To include an object from the Object Repository, you can:
Copy the item.
Inherit from the item.
Use the item directly.
Copying Items
When you copy an item, you make an exact duplicate of the item and add it to your project if it is a form or data module. Any changes to the item in the Object Repository will not be reflected in your copy. Alterations you make to your copy will not affect the original Repository item.
Note: Copying is the only option available for using project templates or project wizards. Using a wizard does not add shared code
it runs a process that generates its own code.
Inheriting Items
Inheriting items is the most flexible and powerful way to use a Repository object. Inheriting lets you reuse items within the same project.
When you inherit an item, a new class is derived from the item and is added to your project. When you recompile your project, any changes made to the item in the Object Repository are reflected in your derived class, unless you have changed a particular aspect.
Changes made to your derived class do not affect the shared item in the Object Repository.
Note: You can inherit forms, dialog boxes, and data modules but not project templates. This is the only option available for reusing items from within the same project.
Using Items Directly
You use the Using Items Directly option primarily with data modules. When you use an item directly, the item is added to your project as if you had created it as part of the project. Design-time changes made to the item appear in all projects that directly use the item as well as any projects that inherit from the item.
Note: Using Items Directly is an option for forms, dialog boxes, and data modules. Modify these items only at runtime to avoid making changes that affect other modules.