What version are you trying to run? There are two versions in this thread. There is an Access and a SQL Server version. Rad was trying to point out to me how he achieves this. The one I posted is a conversion of one that was done a couple of years back and I am in the process of trying to hide it's execution.

Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's