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 263435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:36:05+00:00 2026-05-11T22:36:05+00:00

I know this is a simple question for someone out there, but I have

  • 0

I know this is a simple question for someone out there, but I have never really used function module at all because I did not understand what they were.

So I have a whole bunch of things I can use this for (cut down on redundancy), but I want to know how I call into a sub (like a button click) procedure from a form.

I tried this…

Sub Command_Click()
    Call "pptCreator"
End Sub

I know that is pretty bad, but I have no idea how to bring this into a procedure.

  • 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-05-11T22:36:05+00:00Added an answer on May 11, 2026 at 10:36 pm

    Here are some of the different ways you can call things in Microsoft Access:

    To call a form sub or function from a module

    The sub in the form you are calling MUST be public, as in:

    Public Sub DoSomething()
      MsgBox "Foo"
    End Sub
    

    Call the sub like this:

    Call Forms("form1").DoSomething
    

    The form must be open before you make the call.

    To call an event procedure, you should call a public procedure within the form, and call the event procedure within this public procedure.

    To call a subroutine in a module from a form

    Public Sub DoSomethingElse()
      MsgBox "Bar"
    End Sub
    

    …just call it directly from your event procedure:

    Call DoSomethingElse
    

    To call a subroutine from a form without using an event procedure

    If you want, you can actually bind the function to the form control’s event without having to create an event procedure under the control. To do this, you first need a public function in the module instead of a sub, like this:

    Public Function DoSomethingElse()
      MsgBox "Bar"
    End Function
    

    Then, if you have a button on the form, instead of putting [Event Procedure] in the OnClick event of the property window, put this:

    =DoSomethingElse()
    

    When you click the button, it will call the public function in the module.

    To call a function instead of a procedure

    If calling a sub looks like this:

    Call MySub(MyParameter)
    

    Then calling a function looks like this:

    Result=MyFunction(MyFarameter)
    

    where Result is a variable of type returned by the function.

    NOTE: You don’t always need the Call keyword. Most of the time, you can just call the sub like this:

    MySub(MyParameter)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know this is a simple question, but I can't figure it out. Consider
I know this is a darn simple question, but I'm very used to using
I know this is a really simple question but my google-fu is failing me.
Alright, I know this is a simple question, but I can't seem to get
I know that this is a simple question for PHP guys but I don't
I know this is most-likely a simple question but when you restore a database
I know this is probably a very simple question but how would I do
Just a quick question that no doubt someone out there will know the answer
Warning - I am very new to NHibernate. I know this question seems simple
This is a simple question and I am sure you C# Pros know it.

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.