Simple main form and sub-form where a total of a field on the subform is displayed on the main form.
This calculation and display works perfectly for inserting new rows or changing a field value on the sub-form. This is done using 'on dirty' vb code to requery the subform data and a simple clone record set addition to recalculate the total to be displayed on the main form.
However this does not work when a row on the subform is deleted and code is inserted on the 'on delete' event. I am unable to execute the subform requery of data as I get a runtime error 3709 'search key was not found in any record'.
Any ideas?
This calculation and display works perfectly for inserting new rows or changing a field value on the sub-form. This is done using 'on dirty' vb code to requery the subform data and a simple clone record set addition to recalculate the total to be displayed on the main form.
However this does not work when a row on the subform is deleted and code is inserted on the 'on delete' event. I am unable to execute the subform requery of data as I get a runtime error 3709 'search key was not found in any record'.
Any ideas?