On Fri, 13 Jun 2008 08:17:04 -0700 (PDT), DeanL
<de*************@yahoo.comwrote:
Requery like Rick suggested may work, but I think there is a more
elegant solution. Recall that Excel recomputes formulas without you
having to click a recalc button. Access can do that too: it knows
which expressions depend on which ones, builds a tree and recomputes
without you asking for it.
In your situation I would put a textbox in the footer of subform1,
with a controlsource of:
=count(MyPrimaryKeyField)
Let's call this control txtCountOfRows
Then in the second subform you pick up that value:
=Me.Parent.MySubformControl1.Form.txtCountOfRows
This control will automatically show the new value if the rowcount in
subform1 changes.
-Tom.
>Hi everyone,
I have a subform in datasheet view that is used to display the
contents of a single table. I have another subform with a query
feeding it to give a count of how many particular items are in the
table and wanted to ask how I go about updating the count when I
delete a value from the datasheet subform without closing and
reopening the form?
Many thanks for any help you can offer...
Dean...