The code returns 'No match found' when the Case_Id does exist in the recordset. The control on the form holds a text value. The field [fld_CASE_ID]in recordset(table)is a number. How do I fix this? Thanks for reading.
Code:
Public Sub subGetCase()
Dim curDB As DAO.Database
Dim grst As DAO.Recordset
Dim strCriteria As String
Set curDB = CurrentDb()
Set grst = curDB.OpenRecordset("tbl_SectionABCD_Amounts", DB_OPEN_DYNASET)
strCriteria = "[fld_CASE_ID] = " & Me![txtCASE_ID]
grst.MoveFirst
grst.FindFirst strCriteria
If grst.NoMatch Then
MsgBox "No Match was found."
Else
MsgBox "It worked!"
End If
End Sub