[AccessD] Sub form updates not immediately visible to parent

MarkH lists at theopg.com
Mon May 3 04:03:55 CDT 2004


Thanks... That's how I've been doing it :O(

In the main form I am using my own version of dSum etc. and it still
returns the old value, even after the requery...

Cheers

Mark

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: 01 May 2004 11:20
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Sub form updates not immediately visible to
parent


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.

-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list