H
HSalim
Hi All.
My report is based off a a query.
Query1: Select ItemNumber, TrackNum from Tracking
in some cases TrackNum = ""
Function:
Public Function Tracking (data as string) as string
' some code for example
strtemp = data & "ABC"
Tracking = strTemp
End Function
now the report uses this function in a control source
Text box control source = Tracking(TrackNum)
One would expect that the fuction is called every for every record.
However, I am finding that the function is called only when Tracknum <> ""
i.e. if tracknum is blank, the function is not called at all.
Any idea why?
However, when I use the function in a query, say
Select ItemNumber, TrackNum, Tracking(TrackNum) as Test from Tracking the
function is called everytime.
Any insight would be most welcome.
Thanks and regards
Habib
My report is based off a a query.
Query1: Select ItemNumber, TrackNum from Tracking
in some cases TrackNum = ""
Function:
Public Function Tracking (data as string) as string
' some code for example
strtemp = data & "ABC"
Tracking = strTemp
End Function
now the report uses this function in a control source
Text box control source = Tracking(TrackNum)
One would expect that the fuction is called every for every record.
However, I am finding that the function is called only when Tracknum <> ""
i.e. if tracknum is blank, the function is not called at all.
Any idea why?
However, when I use the function in a query, say
Select ItemNumber, TrackNum, Tracking(TrackNum) as Test from Tracking the
function is called everytime.
Any insight would be most welcome.
Thanks and regards
Habib