Thank you for your response
...
That doesn't work so well...what it gives me is the field heading (repeatedly) rather than the actual data under that heading. ex. the Field List from my Personnel Data table is: Employee Name, Address, Phone, Town, Province, etc. What I need is the data not the headings. I have managed to get it working using a module (pls see below), but there are formatting problems and "Enter Parameter Value" errors for some of the sections. How are your skills with macros
?
Sub MakeReport()
On Error GoTo Err_MakeReport
DoCmd.OpenReport "rptCustom", acDesign
SetReportControls Forms!CustomReport.Combo10.Value, _
Reports!rptCustom.lblfield1, Reports!rptCustom.tbfield1
SetReportControls Forms!CustomReport.Combo13.Value, _
Reports!rptCustom.lblfield2, Reports!rptCustom.tbfield2
SetReportControls Forms!CustomReport.Combo12.Value, _
Reports!rptCustom.lblfield3, Reports!rptCustom.tbfield3
SetReportControls Forms!CustomReport.Combo17.Value, _
Reports!rptCustom.lblfield4, Reports!rptCustom.tbfield4
SetReportControls Forms!CustomReport.Combo19.Value, _
Reports!rptCustom.lblfield1, Reports!rptCustom.tbfield5
SetReportControls Forms!CustomReport.Combo18.Value, _
Reports!rptCustom.lblfield2, Reports!rptCustom.tbfield6
SetReportControls Forms!CustomReport.Combo16.Value, _
Reports!rptCustom.lblfield3, Reports!rptCustom.tbfield7
SetReportControls Forms!CustomReport.Combo14.Value, _
Reports!rptCustom.lblfield4, Reports!rptCustom.tbfield8
DoCmd.Close acReport, "rptCustom", acSaveYes
DoCmd.OpenReport "rptCustom", acPreview
Exit_MakeReport:
Exit Sub
Err_MakeReport:
MsgBox Err.Description
Resume Exit_MakeReport
End Sub
Sub SetReportControls(varFieldName As Variant, conLabel As Control, conTextBox As Control)
If IsNull(varFieldName) Then
conLabel.Caption = " "
conTextBox.ControlSource = ""
Else
conLabel.Caption = varFieldName
conTextBox.ControlSource = varFieldName
End If
End Sub
Private Sub btnCancel_Click()
DoCmd.Close
End Sub
Private Sub btnMakeReport_Click()
MakeReport
End Sub