Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9043125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T10:40:20+00:00 2026-06-16T10:40:20+00:00

I have a function within a module that opens my Home Page Form: Function

  • 0

I have a function within a module that opens my Home Page Form:

Function goto_home()
    Dim stDocName As String

    'DoCmd.Close acForm, "CallingForm.Name" , acSaveYes
    stDocName = "home_page"
    DoCmd.OpenForm stDocName
End Function

It’s in a module because I have command buttons on all my forms that use the code instead of duplicating it within each Form Object.

The commented line in my code should close the calling form before the home page is opened. If I was doing it from a form object I would use me.form.name but you can’t do that in a module.

Is there an equivalent module syntax that allows reference to the Calling Form?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T10:40:21+00:00Added an answer on June 16, 2026 at 10:40 am

    You could always pass the formname in the function e.g:

    Function goto_home(frmName As String)
    
    Dim stDocName As String
    Dim stLinkCriteria As String
    
        DoCmd.Close acForm, frmName , acSaveYes
        stDocName = "home_page"
        DoCmd.OpenForm stDocName, , , stLinkCriteria
    
    End Function
    

    Then as you are calling this from each form, you can put the form’s name in the call argument.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In PHP, is it possible to have a function within a class that's non-static,
I have a function definition of the following form (within a large code): class
Background I have a function that takes a config object as an argument. Within
Lets say I have a recursive function that creates lists within lists. It return
I have created a custom module that includes a hook_submit function. Is it possible
I have a function within my module: <?php function foo($node) { module_load_include('php', 'mymodule', 'path/to/filename');
I have a background worker which calls a function within a separate class. This
The problem seems very strange. I have a AJAX helper function within a same
I have the following function which works very well within a $(document).ready(function(){ $('.threadWrapper >
I have to allocate a struct from within another function, obviously using pointers. I've

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.