Public Save Button

I have one Command button (Save) on my MD Form, and there are lots of Child forms, I would like to use that button for saving data to each form How can I do that in Visual Basic.Net
MohamedAizAsked:
Who is Participating?
 
rockiroadsCommented:
Its been a while since I last looked at vb.net so will describe it

is it possible to create a public function in each of the subforms?
so when save button on main form hit, you call each of the subforms public function

this public function will then perform the save operation specific to that child form
0
 
omegaomegaDeveloperCommented:
Hello, MohamedAiz,

I have used essentially the same approach that rockiroads is recommending.  In my case I was able to have all of my Child forms inherit from the same base form class.  If you can do this it makes it very easy, because then you can simply add the public function he speaks of to the base class.

Cheers,
Randy
0
 
omegaomegaDeveloperCommented:
Hello, Venabili,

I think that rockiroads response provides a good answer to the OP.

Cheers,
Randy
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.