Ok, first off this is somewhat complicated to explain. But I'll give it a shot. I'm develpoing a set of forms (each will behave the same, but have different fields.) On the forms there is a submit button. When the button is clicked, in the rules section of the button, we 1) Set a status field to submitted, 2) Switch views to an email that gets sent 3) Submit using a data connection 4) Switch views to a "form submitted view, and then 5) Submit the form to the appropriate SharePoint library.
The aforementioned process works well EXCEPT, if you have to validate fields (make sure they have an entry) before you submit. I'd thought of setting a condition on the rules, but that only allows you to set 5 conditions, and I have to make certain that more than 5 fields have data in them. So my next attempt was to try to do the above programmatically in vb. However InfoPath prevents you from switching views more than once programmatically.
My main goals are this (but can't seem to accomplish them...)
1) Verify certain fields have data in them before submit is allowed.
2) Send an email to a supervisor alerting them a form has been submitted.
3) Submit the form.
Any help you may be able to afford would be GREATLY appreciated!