Saw that there was this new "How-to" post on using code behind in InfoPath forms. Quite a useful reference when you can't recall the exact steps to get it working.
http://www.k2underground.com/blogs/howtok2/archive/2009/06/29/using-code-behind-with-infopath-forms-sharepoint-and-k2.aspx