Thanks for your repy, I have indeed change my function to a public function, but when I try to run the query, it tells me that the function is undefined.
I have put the SQL below to show what I have done:
SELECT TblLine.LineID, TblLine.LineType, TblLine.LineDim, TblLine.LineShape...