I have been searching trying to figure out the syntax for this but it escapes me.
I am adding records saving and retrieving no proble but how do I delete a record.
So far all I have seen in the Database using msAccess is the record marked #DELETED but is not really deleted. Here is my code.
I could really use some help with this
Thanks
Code:Private Sub cmdDelete_Click1(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdDelete.Click Dim rs As New ADODB.Recordset If MsgBox("Are you sure that you want to Deletet Record?", vbYesNo) = vbYes Then rs.Open("DELETE FROM SDID1OrderDetail where OrderNumber = '" & cbstrCurrOrderNumber & "' and OrderLine = " & SDLI, strConn, 2, 2) MsgBox("The Quote record has been deleted.") 'rs.Update() rs = Nothing HoldHighestSDLI = HoldHighestSDLI - 1 HighestSDLI = HighestSDLI - 1 If SDLI > 1 Then SDLI = SDLI - 1 End If ScreenUpDate() txtDoorA.Text = SDLI txtBaseDoorInfo.Text = "DOOR " & SDLI & " Base:" txtBaseDoorInfo2.Text = "DOOR " & SDLI & " Base:" Else Exit Sub End If End Sub




Reply With Quote