H
Harley Feldman
I am creating a report which I would like to modify at runtime. It has three group levels which were created in Design View and are invisible. From a form, the user can select 1 - 3 levels of grouping, and invoke the following code for each level selected:
Me.GroupLevel(n).ControlSource = strFieldName(intI)
Me.GroupLevel(n).KeepTogether = 2
Me.GroupHeadern.Visible = True
where n is 0 to 2.
I also want to display in the group header the group description which is included in the query for the Record Source for the report.
In the On Open Event, when I try to put the Me.MeansName text box in the group header, and then fill it, I get a message that I cannot reference the control as it does not have the focus. I have since learned that controls are not complete until the form finishes its open event and therefore SetFocus does not work.
What should I do to be able to display the grouping name in the group header?
Harley
Me.GroupLevel(n).ControlSource = strFieldName(intI)
Me.GroupLevel(n).KeepTogether = 2
Me.GroupHeadern.Visible = True
where n is 0 to 2.
I also want to display in the group header the group description which is included in the query for the Record Source for the report.
In the On Open Event, when I try to put the Me.MeansName text box in the group header, and then fill it, I get a message that I cannot reference the control as it does not have the focus. I have since learned that controls are not complete until the form finishes its open event and therefore SetFocus does not work.
What should I do to be able to display the grouping name in the group header?
Harley