Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    May 2002
    Location
    Quincy, Illinois
    Posts
    138
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Getting Active Subdatasheet (Access 2003)

    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

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Getting Active Subdatasheet (Access 2003)

    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.

  3. #3
    2 Star Lounger
    Join Date
    May 2002
    Location
    Quincy, Illinois
    Posts
    138
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Getting Active Subdatasheet (Access 2003)

    Worked perfect...Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •