Unanswered: report displays incorrect function result, textbox has recordsource of a VBA function
I have a report in an ADP, based on a stored proc in SQL Server. A textbox on the report has a recordsource of =somefunction([fld1],[fld2],[fld3],[fld4]) and should display a calculated integer value. It always displays the number 1, which is wrong.
When I display the fields fld1-4 on the form, they show correctly. When I manually run the function from the Immediate window using the displayed values, it gives a correct value (51, for the one I've been using).
All the input parameters are Variant, and are checked and converted accordingly. The result type is Long.
Does anyone know if Access does something (rounding, for example) to calculated values before displaying them? I've looked in the properties of the textbox but all the values imply that no kind of formatting should happen.