Calculated text box not working with slow connection to backend

tomusn83

New member
Local time
Today, 14:32
Joined
Jan 9, 2014
Messages
7
Thanks for all the answers I've found here over the years. Now I have one that I can't seem to resolve just from information already posted in the forums.

I have calculated textboxes in the footer of a form to sum the data in the detail section. The data is stored on SQL Server. Over the LAN, the form populates quickly and the calculated textboxes display their values. However, when working remotely over the VPN, which is notoriously slow, the form takes 5-10 seconds to populate and the calculated textboxes are all blank. I've tried the Requery method on the form as well as the textbox to no avail.

Looking at the .value and .text of the calculated textbox in the debugger, they show the number from the first record in the detail section but display nothing.

The control source is similar for each textbox, but one example is:

=Sum([LaborHours])

Any ideas are greatly appreciated.
 
Can you create a query / view on the server to produce your sum and bring that over with the detail just hide it and display it on the Textbox control ?
 
This happened to me too. So I set the focus to the calculated control and it seemed to solve it. Try it to see if this is a quick fix for the slow server problem.
 
Can you create a query / view on the server to produce your sum and bring that over with the detail just hide it and display it on the Textbox control ?

Thank you. Yes, that does work. I think that workaround will have to be the quasi solution. It appears the .Requery method doesn't work when called manually, which is frustrating.
 
This happened to me too. So I set the focus to the calculated control and it seemed to solve it. Try it to see if this is a quick fix for the slow server problem.

I actually had tried to set the focus on the control and call .Requery but it still displays no value at all, not even the 24.0 the debugger shows is being held in the control's .value.
 

Users who are viewing this thread

Back
Top Bottom