Use what FIRSTKNIGHT suggested, but use VAL instead of CLNG. That will fix your type mismatch error and allow your SQL to execute correctly.

Tom