Results 1 to 2 of 2
  1. #1
    olepkord is offline Novice
    Windows 8 Access 2013 32bit
    Join Date
    Sep 2016
    Posts
    1

    Create button to execute other buttons

    Hello!


    I am very new to macro's and VBA programming and have an urgent issue.

    My problem: I have a form with some buttons which all contain embedded macros (When I click these buttons, they execute a sequence of query's which are specified in the build-in macro expression tool. The query's are used to calculate some values from many tables). The buttons must be run in sequence in order to calculate the values correctly.

    Now I want to create a button in the same form that executes all the other buttons.

    So my question is: How do I create a button which executes other buttons? I suspect this is done in VBA, but I do not know where to enter code or what code to enter.

    I am very grateful if someone could answer me

    I am using Access 2013 (32 bit)

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    I would definitely use VBA. However, since you are using embedded macros vs. named macros that are saved as part of a collection of macros, I do not believe they can be called from your VBA module.

    In order to execute the embedded macro I am imagining that you will need to Raise the event, the clicking of the button. VBA does not do this, the user does this. Sometimes, you can resort to simulating the user via SendKeys. This triggers keystrokes on the User's keyboard.

    If most everything is VBA, it makes things easier in the long run. At least, this is my experience.

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

Similar Threads

  1. RunSQL vs. QueryDef.Execute vs. CurrentDB.Execute
    By caubetiep1337 in forum Queries
    Replies: 8
    Last Post: 12-16-2015, 05:35 PM
  2. Need to create a CaptionCall for buttons.
    By BugsyFrank in forum Programming
    Replies: 3
    Last Post: 08-24-2015, 08:31 AM
  3. Button to execute graph data
    By MFS in forum Forms
    Replies: 6
    Last Post: 08-11-2014, 10:44 AM
  4. Form Button to Execute Disabled Ribbon Command
    By stwalke2 in forum Programming
    Replies: 5
    Last Post: 04-29-2013, 01:00 PM
  5. Combing 2 Buttons Into 1 Button
    By hammer187 in forum Access
    Replies: 8
    Last Post: 10-03-2012, 02:45 PM

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