Click to See Complete Forum and Search --> : Try this one


Derek
February 3rd, 2000, 07:55 AM
Hi,
How do i put up a confirm box in visual basic?
This confirm box is used to allow the person to choose whether the record should be deleted or no?
I would appreciate it if anyone out there could show me the code.
Thanks in advance,
Derek

Ps: I am using

bChoice = window.confirm([sMessage])

how do i use this ??? or any other method.
Thanks

Cakkie
February 3rd, 2000, 08:02 AM
use an msgbox:


dim intAnswer as integer
intAnswer = msgbox("Your text here",vbYesNo+vbQuestionmark,"title here")
if intAnswer = vbYes then
' code to delete record
else
' code not to delete record
endif




Tom Cannaerts
slisse@planetinternet.be

February 3rd, 2000, 08:03 AM
In VB you would use the following

If MsgBox("Delete Record?", vbQuestion + vbYesNo) = vbYes then
'deleterecord
else
'do nothing
End If