Hi all,
i have a dataset. if i want the user entry same primary key and press add button , the program will check it and show the msgbox....
i think more time ,i can't check it, because i have 2 button (add ,delete ), if i chick the add button after do this function , after i go to exits record
will appear problem ......
.....How can i do ,thank you ?
Function checkDatasetExists(ByVal data As String) As Boolean
For i = 0 To WilsonDataSet.company.Count - 1
If Trim(WilsonDataSet.company.Rows(i).Item("Compid")) = Trim(data) Then
Return True
Exit Function
End If
Next
End Function