I have ceated User Defined Functions in SQL 2000 and for some reason they are not working as antisipated. This was my first time in trying to do so. The link below will show you whats going on. I am trying to calculate sales projections for a current month, last 3 months, next 3 months. The user will be able to define the current month and store name.<BR><BR>PROBLEMS:<BR> I thought that if the current month of January was selected then the previous months for the previous year would show. However my database doesn&#039;t have any records for the previous year but it still diplays the current month sales<BR> Same with selecting Dcember as the current month<BR> Accually it really doesn&#039;t appear to work at all even if the selected current month was March. The next 3 months shouldn&#039;t display anything but once again it accually displays whatever the current month sales are<BR><BR>Well Im stumped folks<BR><BR>Any thoughts<BR><BR><BR><BR>http://www.brady-family.net/forcast/view_forcast5.asp