Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Well I tried the "Try and Catch" and that didn't work.. An error message started popping up saying that entry was in the table..
I would think that using a dataset to watch for duplicates would be considered excessive use of force. Why not just create a string of the key values and use instr() to look for duplicates?
dim sListOfKeys as string
...
KeyValue = SName.text
if sListOfKeys.IndexOf(KeyValue) = -1 then
'the key was not found in the string
sListOfKeys &= KeyValue & ","
r = DataSet1.Tables(0).NewRow()
r("PName") = KeyValue
DataSet1.Tables(0).Rows.Add(r)
else
'SName was already entered, do not add
end if
...