G
Grd
Hi,
I have a custom function called FISCALYEAR (TableDate) which I created to
use in a query. It takes a single argument which is a field from a table. I
use this function in a query to determine if the TableDate falls into the
fiscal year. It returns true or false.
The query using this function for one of the columns ran quickly and I was
happy.
I realized later that the function was missing a bit of information and I
needed to refer to a value on a form so I added that to logic of the
function. e.g. Dim x and x= forms!frmMyForm!txtBox.Value.
Now, unfortunately, the query that uses the function runs slowly because of
this change - it is looking up this info from the form everytime the function
is run for each record in the query.
Is there a way to get the value once - like a constant - to stop the
function checking the form for it each time?
Hope I've explained this well! I just disappointed that it slowed everything
down so much but I can't think of a way out of this problem
any help or guidance is greatly appreciated
Thanks
Grd
I have a custom function called FISCALYEAR (TableDate) which I created to
use in a query. It takes a single argument which is a field from a table. I
use this function in a query to determine if the TableDate falls into the
fiscal year. It returns true or false.
The query using this function for one of the columns ran quickly and I was
happy.
I realized later that the function was missing a bit of information and I
needed to refer to a value on a form so I added that to logic of the
function. e.g. Dim x and x= forms!frmMyForm!txtBox.Value.
Now, unfortunately, the query that uses the function runs slowly because of
this change - it is looking up this info from the form everytime the function
is run for each record in the query.
Is there a way to get the value once - like a constant - to stop the
function checking the form for it each time?
Hope I've explained this well! I just disappointed that it slowed everything
down so much but I can't think of a way out of this problem
any help or guidance is greatly appreciated
Thanks
Grd