473,406 Members | 2,954 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

"Calculating..." when form opened

Hello,

I have an Access application with a number of forms. On opening one particular form, the application will sometimes appear to get stuck in a loop with 'Calculating...' in the status bar for some time. This is a problem when using the database on a server, since it seems to be running the same query over and over again.

There is one form in particular I have a particular problem with. Both its form and subform are opened using WHERE filter criteria, using a string filter on Standards.refStd.

Standards are linked to Narratives in a many-to-many relationship, i.e. there is a link table called Link-NarraStand that has the primary key of Standards in one column and Narratives in the other.

In the main form, there are a couple of DLOOKUPs in text boxes on the form.

MAIN FORM SQL:
Expand|Select|Wrap|Line Numbers
  1. SELECT KLOEs.RefKLOE,
  2.        KLOEs.HeadingsRef,
  3.        KLOEs.DescKLOE,
  4.        OfficersKLOE.DescOfficer AS KLOEOfficer,
  5.        KLOEs.Element,
  6.        Themes.RefTh,
  7.        Themes.DescTheme,
  8.        Questions.RefQ,
  9.        Questions.DescQ,
  10.        Questions.Timescale,
  11.        Standards.RefStd,
  12.        Standards.StdExcellent,
  13.        Standards.StdFair,
  14.        Standards.SA,
  15.        Standards.[L4-DateStart],
  16.        Standards.[L4-DateEnd],
  17.        Standards.[L4-DateActual],
  18.        Standards.L4Team,
  19.        SAlevels.DescSA,
  20.        SAlevels.DescPlan,
  21.        Standards.Officer,
  22.        Standards.OfficerAudit,
  23.        Standards.L4weight
  24.  
  25. FROM ((KLOEs LEFT JOIN Officers AS OfficersKLOE ON KLOEs.Officer = OfficersKLOE.RefOfficer) LEFT JOIN Themes ON KLOEs.RefKLOE = Themes.KLOE) LEFT JOIN (Questions LEFT JOIN (SAlevels RIGHT JOIN Standards ON SAlevels.RefSA = Standards.SA) ON Questions.RefQ = Standards.Question) ON Themes.RefTh = Questions.Theme
  26.  
  27. ORDER BY KLOEs.RefKLOE,
  28.          Themes.RefTh,
  29.          Questions.RefQ,
  30.          Standards.RefStd;
SUBFORM SQL:
Expand|Select|Wrap|Line Numbers
  1. SELECT [Link-NarraStand].*,
  2.        qL5NarrativesW.L5order,
  3.        qL5NarrativesW.Level,
  4.        qL5NarrativesW.Status,
  5.        qL5NarrativesW.TextNarrative,
  6.        qL5NarrativesW.TextNarrative2,
  7.        qL5NarrativesW.DateStart,
  8.        qL5NarrativesW.DateEnd,
  9.        qL5NarrativesW.DateComplete,
  10.        qL5NarrativesW.Progress,
  11.        qL5NarrativesW.Officer,
  12.        qL5NarrativesW.Archive,
  13.        qL5NarrativesW.EvidenceLink,
  14.        qL5NarrativesW.WeightL5,
  15.        qL5NarrativesW.L5wgtprog,
  16.        qL5NarrativesW.ModifiedOfficerL5,
  17.        qL5NarrativesW.DateModifiedL5,
  18.        qL5NarrativesW.RefManager,
  19.        qL5NarrativesW.NameManager,
  20.        qL5NarrativesW.DisOfficer,
  21.        qL5NarrativesW.DisDate
  22.  
  23. FROM [Link-NarraStand] LEFT JOIN qL5NarrativesW ON [Link-NarraStand].Narrative = qL5NarrativesW.RefNarrative
  24.  
  25. ORDER BY qL5NarrativesW.L5order,
  26.          qL5NarrativesW.DateStart,
  27.          qL5NarrativesW.DateEnd;
Mar 3 '09 #1
6 13352
NeoPa
32,556 Expert Mod 16PB
@jonnyboy
What causes you to think the delay is any more than the SQL running normally?
Mar 3 '09 #2
Thanks for replying, NeoPa.
When the form opens, it displays the correct records in both the main form and the subform almost immediately.
However, the form seems to be refreshing itself over and again for quite a while, with "Calculating..." in the status bar, which impedes data entry and slows the application right down.
If I select the main form and hold F5, there is a similar effect, although there's nothing in the code that's asking the forms to refresh.
Mar 4 '09 #3
FishVal
2,653 Expert 2GB
@jonnyboy
Access doesn't need something asking it to refresh form / table grid / query grid nor it listens to something asking it not to do it.
Mar 4 '09 #4
Stewart Ross
2,545 Expert Mod 2GB
Hi. I think you are making an incorrect asumption that the problem relates to form refresh. I have experienced very similar issues with a form where I used an unbound textbox to display the entry date of the last record entered. This used a DLookup of a simple Max query returning the latest incident date within the set of 130,000 records. Across the network its performance was very, very slow (not surprising as Access is not client-server based). Because the unbound textbox update was in progress the 'Calculating...' message was on screen for over 30 seconds, and the whole application was more or less unusable in that time.

As a quick check, copy the form involved and on that test copy remove the textboxes with the DLookups, or substitute a specific value for test purposes. See if that modified copy of the form opens without the Calculating... message staying on. If it does, it is the network traffic involved in the asynchronous query launched by the DLookup that is causing the slowdown in performance.

I should make it clear that the use of the domain aggregate function Dlookup is not the issue here; my slowdown was as a direct result of the network traffic resulting from running the query underlying the Dlookup, which was evident whenever I ran the query by itself across the network. When I ran the same query on a non-network copy of the DB there were no performance issues at all, and hence the unbound textbox update did not cause delays when testing.

In my case I could not resolve the problem by changing the query concerned, no matter what I tried. In the end I removed the unbound textbox altogether...

-Stewart
Mar 4 '09 #5
NeoPa
32,556 Expert Mod 16PB
Another possibility might be that, for quite large recordsets, Access will first return a subset of records to be getting along with, before it then goes off to retrieve the rest.

Try this with a large query that has a sort order different from any of its indexes. You will notice the same behaviour (The last record number won't display until all the records have been returned). It seems feasible to me that this explains your extended delay after the forms show up as expected.
Mar 4 '09 #6
Hello again NeoPa, Stewart.

Thanks again for replying so promptly. You're making a really valuable contribution.

I'll check out the indexes situation, and whether I have indexes on those fields I'm looking to sort on.

Jon
Mar 5 '09 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

43
by: steve | last post by:
I am quite frustrated with php’s include, as I have spent a ton of time on it already... anyone can tell me why it was designed like this (or something I don’t get)? The path in include is...
1
by: Julia | last post by:
I have a page that the user will use multiple times. When they submit the form, it sends me the info, and redisplays the form for the user to use again. I have one field in there that I'd like...
1
by: Joe Bongiardina | last post by:
What does the message "calculating...." mean in the lower left status area of a form? I have a form with no calculated, concatenated or lookup fields, yet it displays this msg. The form takes...
86
by: Randy Yates | last post by:
In Harbison and Steele's text (fourth edition, p.111) it is stated, The C language does not specify the range of integers that the integral types will represent, except ot say that type int may...
1
by: Benny Ng | last post by:
Hi,All, Export Method: ------------------------------------------------------------------------- strFileNameExport = "Results" Response.Clear() Response.Buffer = True...
7
by: Simon Verona | last post by:
I have a problem in my application which I believe is due to open handles.. . The symptom that users report is that after they have been using the application for a while, it will randomly just...
4
missinglinq
by: missinglinq | last post by:
I've got someone I'm helping with an app and he has a realtime clock on his main form that runs off of the Timer Event. He reports the message "Calculating..." appearing in the lower left part of the...
2
by: JohnRFeldman | last post by:
This is a question relating to Access 2000/2002, which the Province of Ontario is still using. I have a query based on a join between an ODBC linked SQL Server table and an Access table. The...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.