Access - Tabbed Form - Calling Public Sub from another Tabs Subfrom

Posted on 2012-09-10
Last Modified: 2012-09-10
Hello all,

I had a Private Sub that I made a Public Sub because I need to be able to Call it or Run it after I run some code on another Form via that Form's code...

This is a tabbed form which I think I now understand the coding of the name...... however
I can't get it to run the new Public Sub

The Public Sub is cmdSaveCtlTotals

This is being run from code on Parent.Page3 which is:

Parent.Page2 or
is where the Public Sub is

this is the offending code:

Tried also
Question by:wlwebb
    LVL 29

    Expert Comment

    Don't use the exclamation mark when calling a routine on another form.
    Try this:
    Call Parent.WVLVLControlTotals.Form.cmdSaveCtlTotals

    Author Comment

    I get
    Run-time error 438
    Object doesn't support this property or method...
    LVL 29

    Accepted Solution

    Make sure that Form is not plural.
    Call Parent.WVLVLControlTotals.Form.cmdSaveCtlTotals

    Author Closing Comment


    Thank you!  THAT WAS IT WITH ONE EXCEPTION.... which you would have never known because I screwed up......  the Public Sub is cmdSaveCtlTotals_Click

    I have this "Verify" command button overtop of the cmdSaveCtlTotals command button and if the user inputs anything into one of the fields it hides the "Verify Zeros" command....  

    So in my inept understanding I thought VB would ignore the _Click extension....

    It works if all zeros!!   I'm going to double check that my cmdSaveCtlTotals command still works after I've made it Public......

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
    QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
    Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
    In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

    729 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

    19 Experts available now in Live!

    Get 1:1 Help Now