Do you have the controls in your view bound to the main data source now? I'm thinking from your description, that you initially had the controls bound to the secondary data source. If that is the case, the view will always show the secondary data source values instead of the main data source.
If your 'if' condition is structured correctly, your code to copy the data from one source to another should not be running. If you believe it is, you could do something simple like pop up a message box in the code in the 'if' condition, and then open one of your submitted forms, see if the message box pops up....