gknierim
February 3rd, 2000, 02:17 PM
I have developed a form where the user can pick a name out of a combolist and delete that name from the list. I know how to delete the record but how do I update the rest of the fields on that form after the record is deleted? Currently, it just updates the list and not the rest of the textboxes on the form. My current Delete code looks like this:
private Sub mnuDel_Click()
Dim Response
Response = MsgBox("Are you sure you want to delete " & cboList1.Text & "?", vbQuestion + vbYesNo, "Delete driver")
If Response = vbYes then
With datPrimaryRS.Recordset
.Delete
.Update
.MoveNext
If .EOF then .MoveLast
End With
Exit Sub
End If
End Sub
I only have one text field on this form named 'txtCarNo' that I want to update after I perform the delete.
Another simple one right?
Thanks guys!
private Sub mnuDel_Click()
Dim Response
Response = MsgBox("Are you sure you want to delete " & cboList1.Text & "?", vbQuestion + vbYesNo, "Delete driver")
If Response = vbYes then
With datPrimaryRS.Recordset
.Delete
.Update
.MoveNext
If .EOF then .MoveLast
End With
Exit Sub
End If
End Sub
I only have one text field on this form named 'txtCarNo' that I want to update after I perform the delete.
Another simple one right?
Thanks guys!