My thoughts...
If the function is only for use with the form, then put it on the form. (If you import the form somewhere else you have fewer supporting objects to worry about).
If it is generic and could apply to multiple things, put it in a regular module. (If you use the function somewhere else, deleting the form won't break something else).
Generally though if you are bothering to take the time to break it out, it probabably falls in the second scenario.