Hi, i have a few problems with my code's. I am needed to create a database and link it with visual basic using data. I have done that. I also made a list box that gets populated with the 1 field from the db so u can select it easy. Now my code for delete button is this,
"rsmyrs.delete
lstrecords.removeitem lstrecords.listindex
call cmdclear_click"
When i run that (the code is out of a book) it get error at "cmdclear_click" however if i remove it, it works but after the records get deleted the information still stays in the box (until u select another box etc). Also how do i go about to promnt a box where it asks if i want to delete or not? The book in the code is this .. but it doesnt work.
Const strDelete As String = "Are you sure you want to delete this record?"
Dim resp As Integer
resp = MsgBox(strDelete, vbYesNo + vbQuestion + _
vbDefaultButton2, "Delete Record")
Call cmdClear_Click
End If
End Sub
2007-03-24
02:37:32
·
1 answers
·
asked by
Anonymous
in
Computers & Internet
➔ Programming & Design