Macro executes code 3 times, why? (1 Viewer)

spikepl

Eledittingent Beliped
Local time
Today, 15:33
Joined
Nov 3, 2010
Messages
6,142
I am preparing a right-click menu with 2 items MoveUp and MoveDown, used to reorder records in a form. A2010.

I've prepared code to move selected record up. Open DB, click on a record, click on cmdMoveUp - record moves up.

I can run VBA from macro (and the macro will go into the menu items). So I run the same code but now from macro: mcrDepartmentsMoveUp . Click on a record and click on that button. Now the record moves up 3 positions. Why? The code is only called once.

Update: The thing did not even want to run the macro, because it is in "sandbox mode", seemingly by default, so I turned it off, https://support.office.com/en-us/ar...e-macros-8cc7bad8-38c2-4a7a-a604-43e9a7bbc4fb
 

Attachments

  • MacroWHUT.accdb
    736 KB · Views: 103
Last edited:

Users who are viewing this thread

Top Bottom