If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Change Report Title Based on Source & Date?
I have a report with the following code behind:
Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer) If Format(Forms!frmCommission!cboStartDate, "mmyyyy") = Format(Forms!frmCommission!cboEndDate, "mmyyyy") Then Me.txtTitle = "Commission " & Format(Forms!frmCommission!cboStartDate, "mmm/yyyy") Else Me.txtTitle = "Commission " & _ Forms!frmCommission!cboStartDate & " To " & _ Forms!frmCommission!cboEndDate End If End Sub Private Sub Report_Open(Cancel As Integer) Select Case Form_frmCommission.optSource Case 1 Me.RecordSource = "qryCommInvUS" Case 2 Me.RecordSource = "qryCommInvCanada" Case Else MsgBox "Select Report" End Select End Sub I need to change the title of the report to add either Canadian or U.S. to the title depending on the Record Source, leaving the other criteria in place at the same time. Thanks for any help. Jim |
Thread Tools | |
Display Modes | |
|
|