P
Pendragon
Access03/WinXP
I saw the post from Paul Sator and the response from Graham Mandeno -
unfortunately, adding a checkbox or some other identifier isn't going to help
because I need to have this in the OnDelete property (I think!).
I am revising a form and subform and want to know if in VBA there is a way
to reference the number of records selected on a subform.
The subform has an Amount Due field and the parent form has a Grand Total
field. I would like to update the Grand Total field if subform records are
deleted.
Currently, I am using a recordset ( rs = select * from MyTable where
MyTable.MyID = MyVariable ) and performing the updated calculation on the
grand total field. This works fine if only one record is selected and
deleted; unfortunately, if more than one record is selected, rs.RecordCount
shows a count of 1 and thus the grand total is adjusted only by the amount of
the first record. I would like to run a summation on the Amount Due fields
of the selected records and adjust Grand Total accordingly.
Is there a way to reference the number of records selected on a form? Better
ideas?
Thanks in advance.
I saw the post from Paul Sator and the response from Graham Mandeno -
unfortunately, adding a checkbox or some other identifier isn't going to help
because I need to have this in the OnDelete property (I think!).
I am revising a form and subform and want to know if in VBA there is a way
to reference the number of records selected on a subform.
The subform has an Amount Due field and the parent form has a Grand Total
field. I would like to update the Grand Total field if subform records are
deleted.
Currently, I am using a recordset ( rs = select * from MyTable where
MyTable.MyID = MyVariable ) and performing the updated calculation on the
grand total field. This works fine if only one record is selected and
deleted; unfortunately, if more than one record is selected, rs.RecordCount
shows a count of 1 and thus the grand total is adjusted only by the amount of
the first record. I would like to run a summation on the Amount Due fields
of the selected records and adjust Grand Total accordingly.
Is there a way to reference the number of records selected on a form? Better
ideas?
Thanks in advance.