![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
"Jon Lewis" <jon.lewis (AT) cutthespambtinternet (DOT) com> wrote in news:3IadnZh1T7iS-ArRnZ2dnUVZ8uidnZ2d (AT) bt (DOT) com: Removing the DCounts form the recordsource to the relevant controls does help but there is of course still a delay in the controls themselves populating. What about replacing the DCounts() with subqueries? -- David W. Fenton http://www.dfenton.com/ contact via website only http://www.dfenton.com/DFA/ |
#12
| |||
| |||
|
|
The DCounts were all in the saved query recordsource of the Form so I thought there would be some pre-calculation. |
|
However replacing them all with aggregated subqueries surprisingly virtually elimanates any delay in the Form opening and rendering. Each of the subQueries seems to need its own additional subQuery as I found no way to apply criteria to the fields I am counting in the same query (I mean the criteria has to apply to the Field value and not the aggregated value) but even with this degree of query nesting the form loads with no delay. Just shows how slow domain aggregate functions are. |
#13
| |||
| |||
|
|
Apart from waiting an arbitrary period before making a Form visible is there no way in Access to know when all data has been calculated so that the Form can be rendered in one go. The Form in question is continuous with a Query Recordsource that contains several DCount fields. I've optimised the query as much as I can (saved it, indexes table fields etc.) but the Form is rendered in 'chunks' of records. I've tried all obvious tweeks including: Dim F as New myForm DoEvents myForm.Visible = True (after Visible = False in the Form's open event) to no avail Any comments/ideas? Thanks Jon This may or may not be of any benefit. |
#14
| |||
| |||
|
|
The Form in question is continuous with a Query Recordsource that contains several DCount fields. I've optimised the query as much as I can (saved it, indexes table fields etc.) but the Form is rendered in 'chunks' of records. |
#15
| |||
| |||
|
|
"Jon Lewis" <jon.lewis (AT) cutthespambtinternet (DOT) com> wrote in news:ZPSdnSU6r84O3BvRnZ2dnUVZ7vydnZ2d (AT) bt (DOT) com: The Form in question is continuous with a Query Recordsource that contains several DCount fields. I've optimised the query as much as I can (saved it, indexes table fields etc.) but the Form is rendered in 'chunks' of records. Are you sure you need to use DCounts() in the Recordsource? Can't you remove them from the recordsource, and use the OnCurrent event and use recordsets to look up the information and populate unbound textboxes with the result? I've been programming in Access for 14 years now on a near-daily basis, and haven't needed DCount() in a form recordsource ever. I have a difficult time thinking of a scenario where it would be justified. -- David W. Fenton http://www.dfenton.com/ contact via website only http://www.dfenton.com/DFA/ |
#16
| |||
| |||
|
|
Not quite sure what you mean by use the OnCurrent event here. The starting point for this function of my app is a continuous form with the calculated columns for all records displayed at form load - not calculated for each record when it becomes current. |
|
I thought that having the DCounts in the recordsource would be quicker than than using unbound calculated controls. |
|
In fact both methods in my scenario (which is not particularly complex) are too slow. |
![]() |
| Thread Tools | |
| Display Modes | |
| |