PDA

View Full Version : form update problem



steve62557
11-06-2014, 12:24 PM
I designed a form to display multiple records that the user can select from. there is a buttom to the right of each record. Click the button and that record is deleted via code. The problem is, the form does not reflect that record being gone until I close the form and reopen it. I have tried adding "me.requery" which should cause the form to reload the underlying recordset but nothing happens. This is an access 2003 database.

jonh
11-10-2014, 04:34 AM
No idea. Requery should work if the form is bound.

You could try the built in delete if you aren't already.


Private Sub cmdDelete_Click()
On Error Resume Next
DoCmd.RunCommand acCmdDeleteRecord
Select Case Err.Number
Case 0, 2501
Case Else: MsgBox Err.Description
End Select
End Sub