I have this piece of code that doesn't quite work for me.
Adodc1.recordset.requery 'for when i need to do another search
Adodc1.Recordset.Find "File_No = '" & srchCriteria & "'"
cmdUpdate.Visible = True
cmdDelete.Visible = True
cmdCancel.Visible = True
cmdSearch.Visible = True
cmdReturn.Visible = True
If Adodc1.Recordset.EOF Then
MsgBox ("No record exist for " & srchCriteria)
End If
The code will find an exact match based on the criteria. But somehow, if it doesn't find a match it displays the first record of the table.
any help will be greatly appreciated.
Adodc1.recordset.requery 'for when i need to do another search
Adodc1.Recordset.Find "File_No = '" & srchCriteria & "'"
cmdUpdate.Visible = True
cmdDelete.Visible = True
cmdCancel.Visible = True
cmdSearch.Visible = True
cmdReturn.Visible = True
If Adodc1.Recordset.EOF Then
MsgBox ("No record exist for " & srchCriteria)
End If
The code will find an exact match based on the criteria. But somehow, if it doesn't find a match it displays the first record of the table.
any help will be greatly appreciated.