Hello! I am not really an expert of MS Access. All of a sudden, my DB stopped working and it shows a debugging problem on VBA.
This is the code which is not working:
Code:
Private Sub Status_AfterUpdate()
Dim strWhere As String
Dim strError As String
strWhere = "1=1"
' If Status
If nz(Me.Status) <> "" Then
'Add it to the predicate - exact match
strWhere = strWhere & " AND " & "CODStato = '" & Me.Status & "'"
End If
If strError <> "" Then
MsgBox strError
Else
'DoCmd.OpenForm "Browse Issues", acFormDS, , strWhere, acFormEdit, acWindowNormal
If Not Me.FormFooter.Visible Then
Me.FormFooter.Visible = True
DoCmd.MoveSize Height:=Me.WindowHeight + Me.FormFooter.Height
End If
Me.smRichieste.Form.Filter = strWhere
Me.smRichieste.Form.FilterOn = True
End If
End Sub
Debugger shows that the problem is on those two highligted code parts.
This is the error when I try to open my form: Runtime error '2455' - You entered an expression that has an invalid reference to the property Form/Report
What could be the problem?
Thank you!