CrossTabAndReverse -
Data Entry -
Main data is stored in table T_Sales.
The block of data pertaining to the selected year (Year is entered/selected via
combo box on data entry form - which in turn sets the value of Global variable
RefYear) is pulled from T_Sales via crosstab query. Since a crosstab query is
not amenable to editing, an intervening table T_Cross is used to form the query
serving as RecordSource for the data entry form.
At the end of session for a particular year, latest status in
data entry form gets implemented in the original table T_Sales via suitable
Append / update / delete queries. In order to enable such interaction between
the crosstab format of data entry form and normal structure of original table,
Reverse CrossTab approach is adopted (reflected by query Q_CrossToSales).
Report Generation -
Data for selected range of years is pulled from
T_Sales via crosstab query - into an interim table T_CrossReport, which in turn
forms the basis for query used as RecordSource for the report.