I have a form with a button running rules to submit my form to a SP library and close my form. Then I added some code to that same button to do some other stuff...this was before I found out that rules run before code. Now I assume that I need to remove those rules and have the submit done at the end of the code, but I can't find what exactly I need in the code to do this. I have a data connection for a submit setup (called Main Submit). I'm coding in VB and I know next to nothing about how to go about coding the submit and close the form. Everything I've found on the topic is in piecemeal and I can't get the whole puzzle together.
Other details that may make a difference: browser-enabled form, Infopath 2007, and MOSS 2007
Please help.
Thanks!