Results 1 to 6 of 6
  1. #1
    Caplande is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    May 2020
    Posts
    12

    ACCESS VBA:Calling procedure name extraction


    My question is the following:
    Is it possible to simply get in a procedure named B, called by a procedure named A, the name of the calling procedure (ie A)?
    Thanks for your help
    Caplande

  2. #2
    Bob Fitz is online now Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    2,339
    You could passe the name of procedure A to procedure B when B is called:
    Code:
    Public Sub subA()  Call subB("subA")
    End Sub
    
    Public Sub subB(str As String)
      MsgBox str
    End Sub
    If this helped, please click the star at the bottom left of this posting and add to my reputation. Many thanks.
    Not everyone can access an accdb, you may reach a broader audience by attaching in mdb format.

    Bob Fitzpatrick

    I have never failed. I have found a thousand ways that do not work!

    Microsoft Community Contributor Award (2011)



  3. #3
    Caplande is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    May 2020
    Posts
    12
    This is precisely what I want to avoid

  4. #4
    Bob Fitz is online now Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    2,339
    Quote Originally Posted by Caplande View Post
    This is precisely what I want to avoid
    I'm sorry that my attempt to assist you is of such little value to you. Good luck with your endeavour.
    If this helped, please click the star at the bottom left of this posting and add to my reputation. Many thanks.
    Not everyone can access an accdb, you may reach a broader audience by attaching in mdb format.

    Bob Fitzpatrick

    I have never failed. I have found a thousand ways that do not work!

    Microsoft Community Contributor Award (2011)



  5. #5
    Caplande is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    May 2020
    Posts
    12
    Sorry to have appeared unpleasant. It was not my goal, I just wanted to complete my question. Indeed, I had not indicated in my subject that I wanted to avoid this solution.
    My apologies if you got hurt by my answer.

  6. #6
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    7,045
    Suggest you rephrase your question then, because my interpretation of what you want is the same and I don't see any follow up post where you've clarified. I'm not saying I would have given the same answer, just that whatever "This" is in This is precisely what I want to avoid isn't clear.
    - "doesn't work" doesn't help. Implement changes in copies of your database.
    "Everyone has a photographic memory; some just don't have film." Steven Wright

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

Similar Threads

  1. Data Extraction
    By faisal88 in forum Access
    Replies: 6
    Last Post: 01-11-2017, 09:14 PM
  2. Procedure not calling in a sub form
    By tcheck in forum Access
    Replies: 12
    Last Post: 08-24-2016, 02:45 PM
  3. Zip file extraction
    By pacd97867 in forum Programming
    Replies: 2
    Last Post: 03-05-2015, 02:58 PM
  4. data extraction for overseas
    By mathanraj76 in forum Programming
    Replies: 5
    Last Post: 08-22-2013, 04:03 AM
  5. Data Extraction/update
    By Steven.Allman in forum Queries
    Replies: 4
    Last Post: 02-24-2011, 02:05 PM

Tags for this Thread

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 - Senior Forums