...

View Full Version : Vaildating



hughesmi
09-11-2004, 11:32 AM
I'm not to sure where I should have posted this question, if it needs to be moved then so be it!

I have created a hta application and I need a little bit of help validating the my del function. I need it to say " Are you sure you want to remove this record"

Here is the string.

[QUOTE]
strHTML = strHTML & "<tr><td onclick='deleteUser("& rsData("ID") &")' language='vbscript' style='cursor:hand; color:red'>del</td><td>" & rsData("Title") & "</td> <td>" & rsData("Cat") & " </td> <td>" & rsData("Notes") & " </td><td onclick='editUser("& rsData("ID") &")' language='vbscript' style='cursor:hand; color:red'>Edit</td></tr>"
[QUOTE]


and this is the sub that removes it from my database.

[QUOTE]
sub deleteUser(id)
SQL_query = "DELETE * FROM xbox WHERE ID = " & id <>
conn.Execute(SQL_query)
getdata

end sub
[QUOTE]

Celtboy
09-27-2004, 09:25 AM
Sub deleteUser(id)

If MsgBox("Are you sure you want to remove this record?", vbYesNo) = vbYes Then
MsgBox("Deleting User")
SQL_query = "DELETE * FROM xbox WHERE ID = " & id <>
conn.Execute(SQL_query)
getdata
Else
MsgBox("Aborting.")
End If

End Sub


hth,
-Celt



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum