I'm using Excel, but this is a general coding question. I have a user form that displays a list of records. On that same form, I have buttons to add, edit, and delete records -- your basic CRUD. Let's focus on the Add function. When you click the Add button, a second form pops up that lets you enter the data for the record. My question is, which is the better place to put the code that actually adds the record, in the second form or in the calling form?

In other words, would you black-box the Add form as a complete Add function? Or would you treat the Add form merely as an input device?

In PHP (which I know better than VBA), especially under a Model-View-Controller paradigm, the form is just a view -- it accepts data, it validates data, and it returns data, but the actual processing happens in the controller. Maybe that's my answer, but I don't know VBA well enough.

I realize this is an opinion topic, but all opinions are welcome. I don't have a "right" answer in mind.