Report won't print

Erin M 2021

Member
Local time
Today, 02:43
Joined
Apr 14, 2021
Messages
77
Hi there, I've created a report that runs from a form based on the selections within the form (different names). This report is essentially a 'hub' for 4 sub reports. The report runs fine Report View, but when I go to print preview or just try to export, I get an error and it eventually takes me to a blank report.

Error:

Run-time error '2101': The setting you entered isn't valid for this property.

When I go to debug, it references the form.

Private Sub Report_Open(Cancel As Integer)

Me.Filter = [Forms]![Prospect Reports Manager]![Solicitors]

End Sub

What I'm not able to figure out is that these sub reports each are based off the Solicitors within the form and print separately just fine.
 
Your filter seems suspect.

Typical filter structure

Code:
Me.Filter = "[Name] Like " & Chr(34) & Me.Text32 & "*" & Chr(34)
   Me.FilterOn = True

or

Code:
Me.Filter = "DptCd =" & Chr(34) & Me.Text37 & Chr(34)
 
Your filter seems suspect.

Typical filter structure

Code:
Me.Filter = "[Name] Like " & Chr(34) & Me.Text32 & "*" & Chr(34)
   Me.FilterOn = True

or

Code:
Me.Filter = "DptCd =" & Chr(34) & Me.Text37 & Chr(34)
Solicitors is based on a table.
 
??? So what exactly do you want in the report?
??? The filter acts as a constraint so you need to constraint all of the solicitors to some specific one or group
A specific solicitor or group of solicitors?

Me.Filter = "Solicitor =" & Chr(34) & [Forms]![Prospect Reports Manager]![Solicitors] & Chr(34)
 
??? So what exactly do you want in the report?
??? The filter acts as a constraint so you need to constraint all of the solicitors to some specific one or group
A specific solicitor or group of solicitors?

Me.Filter = "Solicitor =" & Chr(34) & [Forms]![Prospect Reports Manager]![Solicitors] & Chr(34)
No sure I'm fully understanding, but I attempted this with no luck. Why would the full report open in report view but not in print preview when it's using the same filter?
 
Don't know.
Check similar threads and google
 
Why filter the report(s) and not restrict the record source(s) based on the [Forms]![Prospect Reports Manager]![Solicitors] value?
When you set the filter you also have to set the FilterOn property as jdraw showed in post #2.
Cheers,
 
make your report Generic.
do not filter using Open event of the report.
instead do the filtering 'when you open" it using DoCmd:

Docmd.OpenReport ReportName:="theReportName", WhereCondition :="[Solicitors] = '" & Me![Solicitors] & "'"
 

Users who are viewing this thread

Back
Top Bottom