What Event to use when record deleted

G

Guest

I have form with a subform. The form contains text boxes that "summarize"
the records of the subform. When a record is deleted on the subform, I need
the summaries to update.

I've tried using recalc of the form when the OnCurrent event of the subform
triggers, but this causes a loop.
Also, I don't want to rely on the After Del Confirm event, in case they have
confirmations turned off.

Thanks in advance,
Rob
 
L

Lynn Trapp

How are you doing the summaries on your main form? If you put a textbox in
the footer of the subform and set it equal to the SUM() of your field, then
put a textbox on your main form that is equal to the value in the subform
textbox, it should update automatically.

Controlsource of Subform textbox: = Sum([SomeField])
Contorlsource of Mainform textbox: =
Forms!YourMainForm.Form!YourSubForm!SummationTextbox

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top