choosing from Detailed or Summary reports

rkaria

Registered User.
Local time
Today, 12:29
Joined
Nov 19, 2009
Messages
48
Hi All

I would like to set a command button so that when a user clicks on it, they get an option to show the summary version of the report or a detailed one.

Can anyone advise on how to do this please?

Using Access 2007

Thanks
R
 
You can use an option group on the basis of which it can be decided which report to run
 
You can use an option group on the basis of which it can be decided which report to run


Thank you, can you explain in a bit more detail please.

Thanks
R
 
Do you have your details in the details section and the grouping stuff in group headers/footers? If so you can use this to set the detail section to visible or not:

Code:
Me.Section("Detail").Visible = False

If you have a checkbox on your form where you open the report from, for example, which is labeled "Show Details" you can just use this in the Report Detail Section's On FORMAT event:

Code:
Me.Section("Detail").Visible = Forms!YourFormNameHere.YourCheckBoxNameHere
 
I prefer having a Dialog Form that contains StartDate and EndDate Controls with two buttons Detail and Summary. After Opening the Report you hide his Dialog Form and on Closing the Report you Open the Dialog Form so that it reappears.

The reason for this approach is that having looked at the Summary Report there maybe something that requires further investigation so you then run the Detail Report and scrutinise it more thoroughly.

Simon
 
Do you have your details in the details section and the grouping stuff in group headers/footers? If so you can use this to set the detail section to visible or not:

Code:
Me.Section("Detail").Visible = False

If you have a checkbox on your form where you open the report from, for example, which is labeled "Show Details" you can just use this in the Report Detail Section's On FORMAT event:

Code:
Me.Section("Detail").Visible = Forms!YourFormNameHere.YourCheckBoxNameHere

Thank you I tried with the check box as I think thats the way I want to do it, nothing happens when I click on the command button to open the report now.

I created a check box on the form where you click the command button to open the report called check145.

I went to the report in question properties of the detail section and under the event tab and typed under 'On format' the follwing:

Me.Section("Detail").Visible = Forms!AMKreportframework.check143

It looks like it runs something in the background for a couple of seconds but nothing happens or opens.

Do you know why this could be?
 
Thank you every one for you help, I have found a resolution below is the coding I put on a command button:

Private Sub Command31_Click()
DoCmd.SetWarnings False
If MsgBox("Would you like to see summary version", vbYesNo, "title") = vbYes Then
DoCmd.OpenReport "claimsbypartno/warrantycode-product summary", acViewPreview
Else
DoCmd.OpenReport "claimsbypartno/warrantycode-product", acViewReport
End If
End Sub
 

Users who are viewing this thread

Back
Top Bottom