[AccessD] Sub form updates not immediately visible to parent

Jim Dettman jimdettman at earthlink.net
Fri Apr 30 15:51:22 CDT 2004


Mark,

  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.

Any one got any pointers, I'd be real greatful.

Thanks and have a good weekend (I'm off at last)

Mark

--
_______________________________________________
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