Results 1 to 3 of 3
  1. #1
    DrRob is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2016
    Location
    Ulverstone Tasmania
    Posts
    2

    Find Parent form name from called form


    Everything goes wrong sometime with MSAccess. I need to find the name of a forms parent. I open the form from a button command and I want to know the name of the form that the calling button is on.
    I have tried "frmName = Me.Parent.Name" but that doesn't work, yet most places seem to offer that as an answer. Can you please help., i am dying of frustration

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    A form opened as standalone by code from another form has no parent, only subforms have parent. You will have to save the calling form name somewhere so that it can later be retrieved. Use a global variable or pass the name to called form with OpenArgs.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    DrRob is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2016
    Location
    Ulverstone Tasmania
    Posts
    2
    Thank you for this.... I shall do as you say and set a global variable :-)

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Is Form name available in called module?
    By Rich Fulton in forum Access
    Replies: 7
    Last Post: 08-29-2015, 06:47 AM
  2. Form Filters from form called with cmdButton
    By sstiebinger in forum Forms
    Replies: 1
    Last Post: 03-31-2015, 11:37 AM
  3. Replies: 3
    Last Post: 07-03-2013, 01:20 PM
  4. Replies: 4
    Last Post: 08-16-2011, 10:04 AM
  5. Replies: 0
    Last Post: 05-04-2010, 06:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums