Report won't print (1 Viewer)

Erin M 2021

New member
Local time
Today, 02:09
Joined
Apr 14, 2021
Messages
15
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.
 

jdraw

Super Moderator
Staff member
Local time
Today, 03:09
Joined
Jan 23, 2006
Messages
13,680
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)
 

Erin M 2021

New member
Local time
Today, 02:09
Joined
Apr 14, 2021
Messages
15
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.
 

jdraw

Super Moderator
Staff member
Local time
Today, 03:09
Joined
Jan 23, 2006
Messages
13,680
??? 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)
 

Erin M 2021

New member
Local time
Today, 02:09
Joined
Apr 14, 2021
Messages
15
??? 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?
 

jdraw

Super Moderator
Staff member
Local time
Today, 03:09
Joined
Jan 23, 2006
Messages
13,680
Don't know.
Check similar threads and google
 

bastanu

Active member
Local time
Today, 00:09
Joined
Apr 13, 2010
Messages
743
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,
 

arnelgp

error reading drive A:
Local time
Today, 15:09
Joined
May 7, 2009
Messages
12,333
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

Top Bottom