I have created an Access 2016 database for work. I have two combo boxes on the parent form to filter the records on the subform. I have used the following code for each combo box and I get two different errors. One combo box is for Application Name and the other combo box contains the version.
Private Sub cboApplication_AfterUpdate()
On Error GoTo Proc_Error
If IsNull(Me.cboApplication) Then
Me.sfrmRFPQuestions.Form.Filter = ""
Me.sfrmRFPQuestions.Form.FilterOn = False
Else
Me.sfrmRFPQuestions.Form.Filter = "[Application Name]=" & Me.cboApplication
Me.sfrmRFPQuestions.Form.FilterOn = True
End If
Proc_Exit:
Exit Sub
Proc_Error:
MsgBox "Error " & Err.Number & " in setting subform filter:" & vbCrLf & Err.Description
Resume Proc_Exit
End Sub
Private Sub cboVersion_AfterUpdate()
On Error GoTo Proc_Error
If IsNull(Me.cboVersion) Then
Me.sfrmRFPQuestions.Form.Filter = ""
Me.sfrmRFPQuestions.Form.FilterOn = False
Else
Me.sfrmRFPQuestions.Form.Filter = "[Version]=" & Me.cboVersion
Me.sfrmRFPQuestions.Form.FilterOn = True
End If
Proc_Exit:
Exit Sub
Proc_Error:
MsgBox "Error " & Err.Number & " in setting subform filter:" & vbCrLf & Err.Description
Resume Proc_Exit
End Sub
I am getting very frustrated with this error.