Microsoft Office Tutorials and References
In Depth Information
Generating Periodic Reports
' Set controlsource to field¶
Me(Col & intI - 1).ControlSource = rs.Fields(intI).Name¶
Me(Col & intI - 1).Visible = True¶
'Place Total field¶
Me(ColTotal & intI - 1).ControlSource = =SUM([ &
rs.Fields(intI).Name & ])¶
Me(ColTotal & intI - 1).Visible = True¶
Next intI¶
End Sub¶
All fields have been set to be invisible and are only made visible when a field is
found. The coded names like Me(Col & intI - 1) are used to fill the fields from
right to left, but also limit the working of the report to the maximum number of
fields that are predefined.
Generating Periodic Reports
Using this procedure, you can total data by periods using grouped dates.
Example file:
A016.mdb with
form frmPeriods
Scenario: Periodic reports may need to be generated by
day, week, month, four grouped weeks, quarters, or years.
In general, a query per period is created and one subform
fills the period subform on-the-fly.
Search JabSto ::

Custom Search