Hi,
I have a form with a combo box to control the parameter running a report. It's a year select and I would like to add this year to an unbound text box in the Report Header.
I'm guessing its because the report is opening in ViewPreview. How do I open in edit mode, update the txtbox and show in Preview ?
I have a form with a combo box to control the parameter running a report. It's a year select and I would like to add this year to an unbound text box in the Report Header.
Code:
If Me.[cmb_CashFlow] = "Run" Then
If Me.cmb_FinancialYear = "All" Then
FYtitle = "All"
DoCmd.OpenReport "Rpt_CashFlow", acViewPreview
Me!txt_FY.ControlSource = FYtitle
Else
FYtitle = Me.cmb_FinancialYear
strWhere = "FY='" & Me.cmb_FinancialYear & "'"
DoCmd.OpenReport RptName, acViewPreview, WhereCondition:=strWhere
Me!txt_FY.ControlSource = FYtitle
End If
End If
I'm guessing its because the report is opening in ViewPreview. How do I open in edit mode, update the txtbox and show in Preview ?