D
David via AccessMonster.com
Hi,
I have a following problem in my adp/SQL Server project. Having two joined
tables Invoice-Customer on a form frmInvoiceOverview in a Datasheet mode I
need to delete just records from the table Invoice. In order to do this
deletion I use the OnDelete hanler, so my routine looks like:
Private Sub Form_Delete(Cancel As Integer)
DoCmd.RunSQL "DELETE FROM Invoice WHERE InvoiceID = " & Me!InvoiceID
Cancel = True
End Sub
So far so good - the selected records get realy deleted BUT the form does not
refresh, so it still shows the deleted records. Me.Requery does not help much
as the form goes always to the first record in the table which is then
confusing for the user. In addition to that deleting multiple selected rows
slows down the process.
Is there any easy solution how to call a custom delete and keep the usual
behaviour of the Access datasheet Form?
I have a following problem in my adp/SQL Server project. Having two joined
tables Invoice-Customer on a form frmInvoiceOverview in a Datasheet mode I
need to delete just records from the table Invoice. In order to do this
deletion I use the OnDelete hanler, so my routine looks like:
Private Sub Form_Delete(Cancel As Integer)
DoCmd.RunSQL "DELETE FROM Invoice WHERE InvoiceID = " & Me!InvoiceID
Cancel = True
End Sub
So far so good - the selected records get realy deleted BUT the form does not
refresh, so it still shows the deleted records. Me.Requery does not help much
as the form goes always to the first record in the table which is then
confusing for the user. In addition to that deleting multiple selected rows
slows down the process.
Is there any easy solution how to call a custom delete and keep the usual
behaviour of the Access datasheet Form?