I am trying to shorten my coding by writing a function which contains a SQL statment that is called several times from different spots in the page. Part of it works, while others don&#039t. Here&#039s the code:<BR>&#060;%<BR>Function Tally(gt,getMe)<BR> SQL1 = "SELECT COUNT(id) AS getMec FROM idata WHERE "& gt &"= &#039"&getMe&"&#039;"<BR> &#039Set rs1 = conn.execute(SQL1)<BR> getMe = rs1("getMec")<BR> getMe = formatPercent(getMe / acount,0)<BR> Tally = getMe<BR>End Function<BR>%&#062;<BR>Tally = &#060;%=Tally("s3","one")%&#062;<BR><BR>But the first variable of the function, "s3", is not getting passed. Has anyone ever run into this? If I hard code s3 in the function, then the "one" is passed with out any problems.