‘This function use to check if record exist, put this in module area and call this function with sql syntax parameter.
Function Found_Record(pSQL As String) As Boolean
On Error GoTo ErrHandler
Dim rst As New ADODB.Recordset
rst.Open pSQL, ConStr, adOpenDynamic, adLockReadOnly
If rst.BOF And rst.EOF Then
Found_Record = False
Else
Found_Record = True
End If
rst.Close
Exit Function
ErrHandler:
Messagebox Err.Number & “-” & Err.Description
End Function