>> I want to save the record as if the 'Save' button had been clicked on the form and the form to stay open, while I do some other stuff in code
I don't want to say it's impossible, because of course in code most anything is possible, but it would become extremely complicated to do it exactly as you have described.
In this situation I would personally turn on the option to "Insert record when form opens even if not necessary" (see advanced tab, it's not worded exactly like that, but words to that effect.) This means the record is inserted when the form opens, and everything after that is treated as a "change". This makes it easier to add child records along the way, and ultimately the changes to the form record are saved when the form closes.
cheers
Bruce