G
Guest
Hi all,
I have a problem with my speed optimized code. Here is what's happening:
- I have a function that looks up some default values in a table. Within
this function I replaced the DLookup by the SQL-based RstLookup that was
proposed to speed things up. This works just fine.
- I call this function in an query to generate a calculated field. This
works still perfectly as long as I run the query from the database window.
- Now unfortunately I have to run the query from code. As soon as I do that,
I get the error message "Invalid argument".
- If I go and replace the RstLookup again with the DLookup in the said
function, the code runs fine.
Does anybody have an idea why that would be and how to avoid those troubles?
Any help is greatly appreciated.
George
I have a problem with my speed optimized code. Here is what's happening:
- I have a function that looks up some default values in a table. Within
this function I replaced the DLookup by the SQL-based RstLookup that was
proposed to speed things up. This works just fine.
- I call this function in an query to generate a calculated field. This
works still perfectly as long as I run the query from the database window.
- Now unfortunately I have to run the query from code. As soon as I do that,
I get the error message "Invalid argument".
- If I go and replace the RstLookup again with the DLookup in the said
function, the code runs fine.
Does anybody have an idea why that would be and how to avoid those troubles?
Any help is greatly appreciated.
George