Currently I open the report in a form using this code:
Private Sub cmdPrint_Click()
Dim strWhere As String
If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[Case number] = " & Me.[Case number]
DoCmd.OpenReport "unrelated SCT1", acViewPreview, , strWhere
End If
End Sub
I am getting this error code: 2455 (screenshot attached)