[AccessD] Sub form updates not immediately visible to parent

Gustav Brock gustav at cactus.dk
Sat May 1 05:20:05 CDT 2004


Hi Mark

Or you may need to do a requery, though you'll have to use bookmarks
to restore the currently selected records ...

/gustav

>   Add a dbEngine.Idle after refreshing the subform records and just before
> you do the calculations.  This will force JET to finish up it's background
> tasks before continuing with code execution.

> Jim
> (315) 699-3443
> jimdettman at earthlink.net

> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of MarkH
> Sent: Friday, April 30, 2004 3:23 PM
> To: 'Access Developers discussion and problem solving'
> Subject: [AccessD] Sub form updates not immediately visible to parent


> Hi all

> Using AXP in WinXP

> I have a very complex form and subform where the parent performs
> calculations based, partly on, records accessed through the subform.
> Inclusion of the subform records in the calcs is dependant on a yes/no
> field being set to yes.

> On the parent is a button which refreshes the calcs. If I change the
> subforms yes/no value and then click the refresh button on the parent
> straight away, the change is not always reflected in the calculations.
> If I wait 5 or 6 seconds (working on a local backend) then everything is
> fine.

> I have spent a lot of time trying to simplify the code (the refresh
> button being a result) but no matter what there is still a delay
> resulting in the calcs not always being refreshed properly. I tried
> requerying and saving in the subform both after the edit and when the
> refresh button is clicked but I still get the same problem.




More information about the AccessD mailing list