I have some navigation buttons that do not work when the text has parentheses in it. The text comes from a combo box, I take a value from it and perform a findfirst . This was working great until I hit values with parenthesis. For example 3D-1(A)-461 will throw the 2423 error.
Originally I was gonna use a recordset.movenext, but I have three subforms that have to requery and thought this was the best method.
I appreciate all your help.
If TCTOfilt.ListIndex <> TCTOfilt.ListIndex - 1 Then
TCTOfilt.ListIndex = TCTOfilt.ListIndex + 1
Forms!frmMasterDashboard.Requery
Forms!frmMasterDashboard!subFrmApplicNotes.Form.Requery
Dim rst As Recordset
Set rst = CurrentDb.OpenRecordset(Name:="ACbyTCTO", Type:=RecordsetTypeEnum.dbOpenDynaset)
rst.FindFirst Criteria:=BuildCriteria(Field:="[TCTO Number]", FieldType:=dbText, Expression:=Me.TCTOfilt)
If Not rst.NoMatch Then
Me!subFrmOEMNOI.Form.Requery
Else
Exit Sub
End If
Else
TCTOfilt.ListIndex = TCTOfilt.ListCount + 1
Forms!frmMasterDashboard.Requery
Forms!frmMasterDashboard!subFrmApplicNotes.Form.Requery
Set rst = CurrentDb.OpenRecordset(Name:="ACbyTCTO", Type:=RecordsetTypeEnum.dbOpenDynaset)
rst.FindFirst Criteria:=BuildCriteria(Field:="[TCTO Number]", FieldType:=dbText, Expression:=Me.TCTOfilt)
If Not rst.NoMatch Then
Me!subFrmOEMNOI.Form.Requery
Else
Exit Sub
End If
End If