formerTexan
Programmer
I'm using a simple query with a function call. In the trial the function returns a constant integer value. The source table has only 1 record.
the function
1. Run the query by opening in datasheet view, it returns 1 record and makes 1 function call.
2. Set the query as a form recordsource and open the form (continuous view), I get 1 record and 2 function calls.
3. Add conditional formatting to [RosterStatus], the field displaying the function return and then open the form, I get 1 record and 4 function calls. However if I add a breakpoint to the function and step through, only 2 calls occur.
It is a stripped down, standalone form and there are no form level events. Any ideas on what is triggering the redundant function calls?
Thanks
formertexan
Code:
SELECT tblRoster.RosterID, tblRoster.RosterName, tblRoster.Comments, pfRosterStatus([RosterID]) AS RosterStatus
FROM tblRoster;
the function
Code:
Public Function pfRosterStatus(lngID As Long) As Integer
Debug.Print lngID
pfRosterStatus = 2
End Function
1. Run the query by opening in datasheet view, it returns 1 record and makes 1 function call.
2. Set the query as a form recordsource and open the form (continuous view), I get 1 record and 2 function calls.
3. Add conditional formatting to [RosterStatus], the field displaying the function return and then open the form, I get 1 record and 4 function calls. However if I add a breakpoint to the function and step through, only 2 calls occur.
It is a stripped down, standalone form and there are no form level events. Any ideas on what is triggering the redundant function calls?
Thanks
formertexan