hi
i have a more than 10 textboxes, while at each text box i have to check the record which is already exists or not, iam useing access as backend and ado control, pls help
cheers
[email protected]
Printable View
hi
i have a more than 10 textboxes, while at each text box i have to check the record which is already exists or not, iam useing access as backend and ado control, pls help
cheers
[email protected]
This is how i did it:
Private Sub Text1_LostFocus()
'verify there is no duplicates name
Adodc1.RecordSource = "Select name from employeedetails where name='" & Text1.Text & "'"
Adodc1.Refresh
If Text21.Text = vbNullString Then
Else
If Text21.Text = Text1.Text Then
MsgBox "It is already in use,please try another one"
Text1.Text = vbNullString
Text1.SetFocus
Else
End If