• Getting Active Subdatasheet (Access 2003)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Getting Active Subdatasheet (Access 2003)

    Author
    Topic
    #436681

    I’m have a main form that has multiple subdatasheets in it. I also have an ‘AutoKeys’ macro setup to run a function that updates certain fields when F9 is pressed in a certain subdatasheet . My problem is that I need to retreive the specific subdatasheet name, however when I use the screen.activeform property, I get the main form’s name. Is their a way I can get the subdatasheet name?

    Thanks in advance for any help,
    Drew

    Viewing 0 reply threads
    Author
    Replies
    • #1035929

      Try Screen.ActiveForm.ActiveControl.Name. This returns the name active subform as a control on the main form; this need not be the same as the name of the subform in the database window, but it should give you the desired information.

    Viewing 0 reply threads
    Reply To: Getting Active Subdatasheet (Access 2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: