deleting row from continuous form

  • Thread starter Thread starter AlexD
  • Start date Start date
A

AlexD

I'm using a continuous form and using recordset to edit
and delete the rows.
After deleting I have #Deleted in texboxes on the Form.
How could I delete this deleted row from the Form as well?
Thanks

With rst
If intRecordCount <> 0 Then
RunCommand acCmdSaveRecord

.MoveFirst

While Not .EOF
If ... Then
.Edit
...................
If ![RecUnits] = 0 And ![RecKG] = 0 Then

Msg = MsgBox("If ....", vbOKCancel)

If Msg = 1 Then
.Delete
??????????
Else
rst.Close
dbs.Close
Exit Sub
End If
Else
.Update
End If
intDoEvents = DoEvents()
End If
.MoveNext
Wend
End If
End With
Me.Repaint
 
Rather than using a recordset to delete records, put the following code in the
double click event of any field in the continuous form:

DoCmd.SetWarnings False
DoCmd.RunCommand acCmdDeleteRecord
DoCmd.SetWarnings False
Me.Requery

You won't get #Deleted with this method.
 
Back
Top