Feedback by UserVoice

I suggest you ...

Fix Crash when setting a filter in a Report in a Navigation Control (Access 2013/2016)

I have a form with a navigation control. In a navigation button, I set the Navigation Target to the Report "rpt_Test". In the Open event of rpt_Test, I set a filter:

Private Sub Report_Open(Cancel As Integer)

Me.Filter = "TestID > 5"
Me.FilterOn = True

' Access crashes on the End Sub Statement in the second execution
End Sub

When I navigate to this button, the Report_Open event is fired twice, and the crash occurs on the Exit Sub the second time around. It is a hard crash with the message "Access has stopped working".
I can produce the crash as many times as I want, on different machines and on Access Versions 2013 and 2016. My Access 2016 version is 1710 (Build 8625.2132 Click-To-Run), i.e., the most recent version.

Known workaround: Instead of setting then Filter property, set the recordsource of the report:

Me.Recordsource = "Select * From & " Me!Recordsource & " Where TestID > 5"

This requires that the record source is a table or a stored query.

Matthias Kläy
Kläy Computing AG

1 vote
Sign in
Sign in with: facebook google
Signed in as (Sign out)
You have left! (?) (thinking…)
Matthias Kläy shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →


Sign in
Sign in with: facebook google
Signed in as (Sign out)

Feedback and Knowledge Base