Results 1 to 4 of 4
  1. #1
    sabre1 is offline Novice
    Windows XP Access 2010 (version 14.0)
    Join Date
    Oct 2010
    Posts
    22

    Run a Embedded Macro from VBA Code

    I am trying to rerun an embedded macro which is attached to the AfterUpdate event of a combobox. Is there anyway of rerunning this query from VBA Code?

    I have tried using:



    DoCmd.RunMacro

    However it says you need to insert the Macro name however i do not know what the embedded macro is called in order to refer to it.

    Any help would be greatly appreciated.

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    I think embedded macros are only meant to be run once. why rerun it? if you need to run it on any other event, write it again behind that event. there really should be no need to do something like this.

  3. #3
    sabre1 is offline Novice
    Windows XP Access 2010 (version 14.0)
    Join Date
    Oct 2010
    Posts
    22
    Thanks for the reply, however, we do have a need to rerun it on that same event in order to populate our form after inserting a specific value from another form into the combobox and we need the combobox to run the searchforrecord macro again. A refresh doesnt work unfortunately.

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    if you need to run something twice, write vba code or something instead. running twice, I don't think, is possible. sorry!

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

Similar Threads

  1. Replies: 1
    Last Post: 08-05-2010, 12:01 AM
  2. Replies: 0
    Last Post: 07-13-2010, 07:45 AM
  3. Run Embedded Macro
    By smikkelsen in forum Forms
    Replies: 0
    Last Post: 07-07-2010, 09:44 PM
  4. Adding VB code on a embedded coding for a button
    By cwwaicw311 in forum Programming
    Replies: 1
    Last Post: 02-20-2010, 12:25 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