I need Help!! I want my Form to accept a unique ID.. it will check if a record already exists in the datbase if so prompt user to chage the inputed value..
what I did was filter the Database with the inputed value. If it already has a record then a MSGBOX prompts the user that a record already exists
Here's My CODE:
ADO.Recordset.Filter = "[emp] = '" & txtEMP.Text & "'"
'filters data grid displays any record similar to "txtEMP.Text"
If ADO.Recordset.RecordCount > 1 Then
'If "txtEMP.Text" exists
MsgBox "Record Already Exits"
'prompts user to change "txtEMP.Text"
Else
ADO.Recordset.Update
'accept the value of "txtEMP.Text"
End If
.. any onther way??