Kevin Carl
New member
Here is the code:
Private Sub cmdDelete_Click()
If MsgBox("Are you sure you want to delete this room?", vbYesNo, "Delete Room") = vbYes Then
conn.Execute "DELETE * FROM Room where rm_no = '" & txtRoom & "'"
rs.Requery
Set dgRoom.DataSource = rs
MsgBox "Room successfully deleted.", vbInformation, "Room Maintenance"
Form_Load
Else
Exit Sub
End If
End Sub
im trying to delete the data in the database. using VB6.
Kindly Help please. Thanks
Private Sub cmdDelete_Click()
If MsgBox("Are you sure you want to delete this room?", vbYesNo, "Delete Room") = vbYes Then
conn.Execute "DELETE * FROM Room where rm_no = '" & txtRoom & "'"
rs.Requery
Set dgRoom.DataSource = rs
MsgBox "Room successfully deleted.", vbInformation, "Room Maintenance"
Form_Load
Else
Exit Sub
End If
End Sub
im trying to delete the data in the database. using VB6.
Kindly Help please. Thanks