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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:40:52+00:00 2026-06-11T00:40:52+00:00

I know in the .Net framework you can map any controls events to a

  • 0

I know in the .Net framework you can map any controls events to a singular method, as if you wanted to map a column of buttons in a GridView to one method, you could.

In VBA i have since forgotten this information. Could someone help me out in how i can map a Forms’ Control(s) to one method in the Forms Code-Behind?

Current OnClick Events, to be consolidated

Private Sub btnSubmit_Click()
    CloseForm Me
End Sub

Private Sub btnCancel_Click()
    CloseForm Me
End Sub

There are at least two of these methods per form. On some there are 3 or 4 for various Events but they all have the same body, one line pointing to a global method.

  • 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-11T00:40:54+00:00Added an answer on June 11, 2026 at 12:40 am

    It depends on what you want to do. You can set up the form so that it receives the click events and check the screen.active control or you can set the event line on the property sheet for each control to a function. Frequently, people who are not familiar with the ease of MS Access go a long way around, which is why it is useful to say what you wish to do, there is often an easier way and often a way that does not involve code at all.

    On the click line of the property sheet for the control:

    =Menu_Or_Exit([Name],"cmdClose")
    

    of course you could pass Me as form, but I have found [Name] to be very useful in a number of ways.

    An excerpt from the function:

            Case "cmdClose"
                DoCmd.Close acForm, FormName
                CheckMainMenu
    

    You can keep a menu form, a menu subform, or just copy the button from form to form.

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

Sidebar

Related Questions

I know that .Net framework runtime is contained in mscoree.dll.Can anyone help me in
I just wanted to know if there's anything built into the .net framework where
Is there any class in the .NET framework that can read/write standard .ini files:
Does anyone know if C# can be used in .NET Framework 2.0 to use
I know for CTP VS 2010 Images, but can I download only .NET Framework
I know it is possible with the .NET framework of Microsoft to do some
Occasionally I will know that there is a .NET Framework function that returns a
When Installing .NET Framework 4 in the near future, I would like to know
I want to know what is the difference between .Net Framework and .Net MonoframeWork
Suppose I have an MSI, that has .NET Framework as a pre-requisite. I know

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.