Attempting to populate unbound fields on a report. Seems like a no brainer?
Report has no record source. The fields (1 combo and 2 text) are unbound. The combo has the appropriate control source / fields are formatted as they should be.
Tried setting it via VBA from the command that opens the report. Blank
Tried setting it via the Form Open or Load events. Blank
Just for a test; I put a command button on the report and used all the same variables. The fields are then populated!
(The Control sources of the other fields are being applied fine)
'Open the Report
DoCmd.OpenReport stDocName, acViewReport, , , acHidden
'Populate the Report
'Report Range
[Reports]![rptReportName].Report![txtReportStartDate].Value = [Forms]![frmMAIN]![sfrmReportConfigurator].[Form].txtFLTRStartDate
[Reports]![rptReportName.Report![txtReportEndDate].Value = [Forms]![frmMAIN]![sfrmReportConfigurator].[Form].txtFLTREndDate
'Department
If [Forms]![frmMAIN]![sfrmReportConfigurator].[Form]!optFLTR_Dept.Value = 1 Then
[Reports]![rptReportName].Report.[cbo_Dept].Value = 7
[Reports]![rptReportName].Report.COUNTFIELD.ControlSource = "=" & DCount("*", "QUERYNAME")
else if
[Reports]![rptReportName].Report.[cbo_Dept].Value = 7 = [Forms]![frmMAIN]![sfrmReportConfigurator].Form.[cboFLTR_Dept]
[Reports]![rptReportName].Report.COUNTFIELD.ControlSource = "=" & DCount("*", "OTHERQUERYNAME")