Order of data refresh

Kowalski

Registered User.
Local time
Today, 20:04
Joined
Jul 5, 2007
Messages
121
Hi
I have a graph on my form, an Update/Refresh button, and a textbox that display a calculted value.

The textboxes controlsource is "=GetMyValue()"

Now when I click the Update button on the form, I would like to have the graph to refresh first, and then the textbox should update its value by running the GetMyValue function. But it works the other way around.

I've even tried to reset and set the textbox controlsource in the click event but it still get's preference above the refresh of the graph.

Any ideas?
 
Why is the order of refreshed objects important to you? Are you basing the graph on the value of the control?
 
The graph is the important object on the form and takes a couple of seconds to refresh (based on the user's filters).
The textbox is just additional nice-to-have data, which also take some time to load.
The reason why the display order is important is that if the main data item (graph) can be displayed quickly, the user can start looking at the graph while the less important data (the textbox) loads.
So in short, perceived performance.
 
So in short, perceived performance.

Consider yourself fortunate! :cool:

Most of my work I am doing in the Client/Server model. Once I was testing adding some functionality, prototyping quickly in Access / VBA code a Sum operation on records. I first implementation as an Access Sum. That "calculated field" took a few seconds to calculate / populate.

Later I did the calculation correctly, placing the Sum in a separate Stored Procedure running on the database server. Now the screen populates INSTANTLY, all at once, no more delay as the SQL BE DB performs the Sum lightning fast.
 
Will be tricky. My graph and textbox is based on a query that is dynamic and gets changed based on user selection. So I'll have to optimise it so that Access dynamically changes a view so that the Stored Proc can read from it.
What makes it more complicated is that under certain conditions the dynamic query will be a crosstab query which is not supported by SQL.
But at least you provided some ideas and something that I have not thought of before. Thanks.
 
A coworker here is working on another application / system, predominantly in Excel. They have had huge performance improvements turning off automatic refresh while updating calculations, then enabling it again once all of the new data has been populated. For them, the difference between a couple of seconds and HOURS.
 

Users who are viewing this thread

Back
Top Bottom