Link to home
Start Free TrialLog in
Avatar of fayb
fayb

asked on

If record exists

In vb5, I have code that works fine to delete a record if the name is "Brown"

sName = Brown
Set dbtemp = OpenDatabase(dbname)
    dbtemp.Execute "DELETE * FROM List1 WHERE Name = " & "'"  &  sName & "'"
dbtemp.Close

Do I need a trap in case there are is no Brown in the Name field.
ASKER CERTIFIED SOLUTION
Avatar of robbert
robbert

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial