Use option group to select Detail Or Summary rpt

rdw456

Novice
Local time
Yesterday, 18:02
Joined
Jul 20, 2012
Messages
43
Hello All,

I have a report that by making the detail section visible or not changes it from a summary to a detail. I have an option group with two buttons summary value 1 and detail value 2 In the report detail On Format property I have the following code

---------------------------------------------------------------------------------
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

Dim Frame16 As OptionGroup

Select Case Frame16.Value

Case 1
Option19.Value = 1
Reports!RptCampaignData.Section(acDetail).Visible = False
Case 2
Option21.Value = 2
Reports!RptCampaignData.Section(acDetail).Visible = True

End Select

End Sub

I am just not getting it so a little bit of help would be great. Is there anywhere that explains the concept completely that I could reference.

Thanks Bob
 
I do it in the report's open event (unless you want it to vary by record), like:

Code:
  If Forms!FormName.OptionGroupName = 1 Then
    Me.Detail.Visible = False
  End If
 
It worked great thanks for your quick response.

Bob
 

Users who are viewing this thread

Back
Top Bottom