Microsoft Office Tutorials and References
In Depth Information
Generating Periodic Reports
Figure 97 – Periodic Reports
To select the time period, a frame with radio buttons is used. A value from 1 to
6 is returned when a selection is clicked. In the AfterUpdate event of the frame,
the query that fills the subform is set, depending on the choice.
This only works when each period has exactly the same fields to show. If this is
not the case, a different subform needs to be created. In this case, we change
the subform instead of changing the subform’s record source.
The code is as follows:
Private Sub fraPeriod_AfterUpdate()¶
Select Case Me.fraPeriod¶
Case 1¶
Me.sfrmPeriod.Form.RecordSource = qryDay¶
Case 2¶
Me.sfrmPeriod.Form.RecordSource = qryWeek¶
Case 3¶
Me.sfrmPeriod.Form.RecordSource = qry4weeks¶
Case 4¶
Me.sfrmPeriod.Form.RecordSource = qryMonth¶
Search JabSto ::

Custom Search