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

  • Home
  • SEARCH
  • 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

Ask A Question

Stats

  • Questions 283k
  • Answers 283k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer For import: Try MySql's built-in csv import: LOAD DATA INFILE… May 13, 2026 at 4:14 pm
  • Editorial Team
    Editorial Team added an answer You can use git diff --name-only to should only the… May 13, 2026 at 4:14 pm
  • Editorial Team
    Editorial Team added an answer Hashes of lists are tricky that way. @$ref->{element} gets parsed… May 13, 2026 at 4:14 pm

Related Questions

This is probably a simple question, but I really don't know what I'm doing
I have a quick and hopefully simple question that I hope someone can help
I have an Address object that has properties AddressLine1, AddressLine2, Suburb, State, ZipCode. (there
I don't know if this is the place to ask about algorithms. But let's

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.