Query Function Calls... (1 Viewer)

DALeffler

Registered Perpetrator
Local time
Today, 04:46
Joined
Dec 5, 2000
Messages
263
Say I have a query that makes more than one function call to the same function in the Where clause of the SQL statement.

The function calls would pass an argument such that the function parses a string (form value) into a public array the first time the query makes a call to the function and simply references those array elements on subsequent function calls.

The function would look something like this (standard module):

Code:
Public Dim str(10) as String
...
Function fncPrse (strPassed as String) as String
...
 If Mid(strPassed,1,1) = "T" Then 
   'parse form value into array elements
    For I = 1 to 10
      ...
      str(I) = Mid(forms!myform!mytxtbx, whatever, whatever)
    Next I
    fncPrse = "T"
 Else
    ...
    fncPrse = str(n)
 End If
End Function

Can I depend on the first Where clause element in the SQL statement always being executed first, so that on subsequent function calls in the SQL where clause - which would only return the array elements - the function will return the parsed array elements from the form text box?
 
Last edited:

Users who are viewing this thread

Top Bottom