Re: Halt code execution until requery is finished.



"Marshall Barton" <marshbarton@xxxxxxxxxx> wrote in message
news:9u44v1tabmqimth8kejeko5kdkqdplc8u0@xxxxxxxxxx
..

Are you saying that a "totals" query would execute completely before
allowing further code to run, whereas the calculated value in Sub2
doesn't?
I'll give that a go... I am determined to find some way around this...
ugly
or not!

Yes, That's pretty much what I'm saying. If you open a
recordset on a totals query, it will use the latest saved
values, regardless of the state of the calculations in the
form. The fundamental premis is that if you need a value in
a vba procedure, then you need to use VBA code to calculate
the value, i.e. eliminate all cross dependencies between
Access's various tasks.


I also have had to use this approach that Marsh mentions -- my other
solution is not always 100% successful in all situations.

:-(


--

Ken Snell
<MS ACCESS MVP>


.



Relevant Pages

  • Re: Queries;Calculations
    ... did you change the detail section's visible property to false. ... To calculate summary data in a query ... when I really only need the totals. ... > calculations, consider doing those calculations in a query, instead. ...
    (microsoft.public.access.queries)
  • Re: Calculations in a query...Is there a max count?
    ... Hello John, Thanks for the reply! ... >>five calculations per week for the fourteen week league timeframe, ... > Easy with a Totals query based on the normalized structure. ...
    (microsoft.public.access.queries)
  • Re: Calculations in a query...Is there a max count?
    ... >all fourteen weeks of the league together. ... >five calculations per week for the fourteen week league timeframe, ... Easy with a Totals query based on the normalized structure. ...
    (microsoft.public.access.queries)
  • Re: Changing a Number to Equal Date
    ... If you're saying that you have a date field AND the year field in your ... In a query, add a computed field that uses ... do calculations with this "year" field to produce another date. ... I tried using CDate, however it ...
    (microsoft.public.access.gettingstarted)
  • Re: Help -- Is my there any way to not count duplicate values here?
    ... The query I have is exactly what I need, ... except the totals are not. ... Are you saying that I should create a ... Duane Hookom wrote: ...
    (microsoft.public.access.queries)