Public Save Button

Posted on 2006-03-28
Last Modified: 2010-04-17
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
Question by:MohamedAiz
    LVL 65

    Accepted Solution

    Its been a while since I last looked at 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
    LVL 12

    Expert Comment

    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.

    LVL 12

    Expert Comment

    Hello, Venabili,

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


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Suggested Solutions

    A short article about problems I had with the new location API and permissions in Marshmallow
    If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now