Command button to go from one report to another

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have 2 reports. One sorted by last name and the other
by region and then by sales. I would like to offer the
user a choice to go from one report to another. Is this
possible?

Thanks
 
yes. you will have to add 1 option button for each report.
then put code behind each option button like this
Private Sub OptItemID_Click()

If Me.OptItemID = True Then
Me.OptDate = False

End If
end sub
this way, clicking 1 option button on turns the other
option button off to keep from printing more than 1 report.
then behind your print button(i assume you have one) put
the following code.
If Me.OptItemID = True Then
DoCmd.OpenReport "VenMatDiscrptAll", acViewPreview
Else
If Me.OptDate = True Then
DoCmd.OpenReport "VenMatDiscRptbyOpen",
acViewPreview
End If
End If
End Sub
hope this helps. FSt1
 
Back
Top