Have you explicitly declared the [Mod Reference] parameter as text. If not, modify the query to include that line, which preceeds your SQL string
PARAMETERS [Mod Reference] Text ( 255 );
To do this from the query grid, right click in the upper portion of the grid and select the Parameters option from the popup window. Then, in the grid, enter your parameter "[Mod Reference]" (without the quotes) and select the text datatype.