DoCmd.OpenReport "rptYearlyWPPI_Expenditures", acViewDesign, , , acHidden
Dim sSql As String
If IsNull([Forms]![JobsStatsInfoForm]![MonthIndicator]) Then
[Reports]![rptYearlyWPPI_Expenditures]![qryWPPI_Funding subreport].Report.RecordSource = "qryWPPI_Funding_Null_sbrpt"
[Reports]![rptYearlyWPPI_Expenditures].RecordSource = "qryWPPI_Funding_Null"
Else
[Reports]![rptYearlyWPPI_Expenditures]![qryWPPI_Funding subreport].Report.RecordSource = "qryWPPI_Funding_sbrpt"
[Reports]![rptYearlyWPPI_Expenditures].RecordSource = "qryWPPI_Funding"
End If
DoCmd.Close acReport, "rptYearlyWPPI_Expenditures", acSaveYes
DoCmd.OpenReport "rptYearlyWPPI_Expenditures", acViewPreview
DoCmd.OpenReport "rptYearlyWPPI_Expenditures", acViewPreview
If IsNull([Forms]![JobsStatsInfoForm]![MonthIndicator]) Then
[Reports]![rptYearlyWPPI_Expenditures]![qryWPPI_Funding subreport].Report.RecordSource = "qryWPPI_Funding_Null_sbrpt"
[Reports]![rptYearlyWPPI_Expenditures].RecordSource = "qryWPPI_Funding_Null"
Else
[Reports]![rptYearlyWPPI_Expenditures]![qryWPPI_Funding subreport].Report.RecordSource = "qryWPPI_Funding_sbrpt"
[Reports]![rptYearlyWPPI_Expenditures].RecordSource = "qryWPPI_Funding"
End If
Private Sub Report_Open(Cancel As Integer)
If IsNull([Forms]![JobsStatsInfoForm]![MonthIndicator]) Then
[Reports]![rptYearlyWPPI_Expenditures].RecordSource = "qryWPPI_Funding_Null"
Me![qryWPPI_Funding subreport].Report.RecordSource = "qryWPPI_Funding_Null_sbrpt"
Else
[Reports]![rptYearlyWPPI_Expenditures]![qryWPPI_Funding subreport].Report.RecordSource = "qryWPPI_Funding_sbrpt"
[Reports]![rptYearlyWPPI_Expenditures].RecordSource = "qryWPPI_Funding"
End If
End Sub
Private Sub Report_Open(Cancel As Integer)
If IsNull([Forms]![JobsStatsInfoForm]![MonthIndicator]) Then
[Reports]![rptYearlyWPPI_Expenditures].RecordSource = "qryWPPI_Funding_Null"
Me![qryWPPI_Funding subreport].Report.RecordSource = "qryWPPI_Funding_Null_sbrpt"
Else
[Reports]![rptYearlyWPPI_Expenditures]![qryWPPI_Funding subreport].Report.RecordSource = "qryWPPI_Funding_sbrpt"
[Reports]![rptYearlyWPPI_Expenditures].RecordSource = "qryWPPI_Funding"
End If
End Sub
acSaveNo
?