>Hi all
>
>I have 2 form classes based on a parent class. These 2 forms contain same processing codes but uses different tables and cursor in terms on name only.
>
>Except for making the names same or macro substitution, is there any way to put the code into the base class?
>
>Please advise.
Yes, you can open two different tables with the same alias.
Let's assume for an example that you have material reception, and material delivery, in different tables. Structures are similar. Give a name to the combined table concept for instance, "MaterialMovement", or something more generic, like "TableProcessed".
use (ThisForm.cTableName) alias MaterialMovement
Later, the Grid.RecordSource, a TextBox.ControlSource, or any command, would all refer to the alias "MaterialMovement".
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)