Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Requery directed to a specific control fires unwanted total form refresh

17 views
Skip to first unread message

Eric

unread,
Feb 11, 2012, 12:00:34 PM2/11/12
to
I've got a unbounded form with 2 subforms. When an event occurs in 1
form, on update, it tells the parent main form to refresh a single
control. Strangely, rather than the refresh only being for the NAMED
control on the parent, all the controls on the parent form get
refreshed which is not desired.

Any thoughts why this happening? Or how one might program around such.

Eric

unread,
Feb 11, 2012, 12:38:12 PM2/11/12
to
I have an answer: I post it here should anybody else ever be as
stumped as I was.

To help understand, this is what I have:-

Form:
+-------------------------
|SubForm1
|+---------------------
|| list of idStmt, sqStmt
|+-----------------

|SubForm2
|+---------------------
|| list of amEntry
||------------------
||Total (amEntry)
|+-----------------
|
|idStmtCurrent: <value echoed from SubForm1>
|sqStmt: <value echoed from SubForm1>
|amOpen: <=function(sqStmt)>
|amTotal: <=SubForm2.Total(amEntry)>
|amBalance: <=amOpen - amTotal>
|
| <Now()>
+-------------------------

I believe what is happening is that a change in SubForm 2 (which has a
subtotal) causes a control on the parent form to reset (it shows the
"total" from Subform 2).

That in turn is referenced by a control (that subtracts the value from
the "total" that comes from the Subform) from another control.

Access cascades the refresh I guess and goes back to the other control
that also supplies data into the calculation. In turn, that goes back
to another "reference" that points to the currently selected value on
SubForm 1 (which was not part of the key).

What was still strange is that other fields on the form (I set a test
field's data source to =Now()) were also getting refreshed.

I changed the reference to another field (now the "idStmt (key)" that
is also echoed back from subform1), and the cascade refreshing stopped.
0 new messages