T
Tara
I have several reports where the user can change the underlying data source
according to a drop-down list on a form. It works perfectly, but now I need
to also change the report labels to reflect which report was generated.
Here's the code that is used to change the data source for one of the
reports. I'm not sure how to incorporate the change for the label though.
Private Sub Report_Open(Cancel As Integer)
Select Case Forms!frmReportType!cboReport
Case "Original"
Me.RecordSource = "UqryTimeSheet"
Me.OrderBy = "UqryTimeSheet.Program"
Case "Amended"
Me.RecordSource = "UqryTimeSheetAmended"
Me.OrderBy = "UqryTimeSheetAmended.Program"
Case Else
MsgBox "Please contact the database administrator for assistance"
End Select
End Sub
Thanks for any help!
according to a drop-down list on a form. It works perfectly, but now I need
to also change the report labels to reflect which report was generated.
Here's the code that is used to change the data source for one of the
reports. I'm not sure how to incorporate the change for the label though.
Private Sub Report_Open(Cancel As Integer)
Select Case Forms!frmReportType!cboReport
Case "Original"
Me.RecordSource = "UqryTimeSheet"
Me.OrderBy = "UqryTimeSheet.Program"
Case "Amended"
Me.RecordSource = "UqryTimeSheetAmended"
Me.OrderBy = "UqryTimeSheetAmended.Program"
Case Else
MsgBox "Please contact the database administrator for assistance"
End Select
End Sub
Thanks for any help!