I have a form:-
Which is a Form with a with a subform – here is the design view of the subform
Which is a Datasheet
It worked well with the first 7 columns each with a single field as Control Source.
I have added an eight column which is far more complex. It uses a public function (in VBA) to calculate an 8 week average based on the vehicle and ProductId from the same table which is the main source of the (sub)form
The Control source of the 8th column is
Code:
=gcAverageEggReturns(GetEggVehicle(),[ProductID],GetEggDate())
I have put a break point in the function and I know it is obeyed when the form loads and I can see it returns non-zero results.
But when I run the form normally the eight column is always filled with zero.
At some point I did observe the form load quite slowly and the first 7 columns appeared immediately but the 8th took longer to load as if it did some sort of repaint and lost the function results in some way
Any ideas what is going on????