X
XMan
How can I delete a record in sub-form? I'm looking to have a Delete button
in the sub-form and delete that record only. TIA.
in the sub-form and delete that record only. TIA.
Van T. Dinh said:The code I post only delete a "block" of Records if there
is a selected "block". If there is no "block", the Command
will delete the CurrentRecord.
To ensure that the user deletes the right Record, I
normally use the Form in CtsFormView and put the Delete
button in the Detail section. This way, the user see
instances of the Delete button and whichever instance
he/she clicks, the associated Record becomes the
CurrentRecord which will be deleted then.
It goes without saying that you should ask the user to
confirm before deletion.
HTH
Van T. Dinh
MVP (Access)