Custom right click move record up and down (1 Viewer)

spikepl

Eledittingent Beliped
Local time
Today, 19:20
Joined
Nov 3, 2010
Messages
6,142
I've made a RH-menu, to move records. A2010

- open attached DB
- place cursor in field Department in the middle of the form
- right click
- select MoveUp
- do it again and again, then I get error when record is in second position from top in the table:
"The expression you entered contains invalid syntax
You may have entered a comma without a preceding value or identifier"

When I execute the moveup using the same code but clicking on the button cmdMoveUp, no error. When that same code is called from the right-click, I get the error.

Update, FYI: The menu is set up in Module1, sub Menus. Menus is called from OnLoad of the form in question.
 

Attachments

  • MacroWHUT - Copy.accdb
    640 KB · Views: 107
Last edited:

bob fitz

AWF VIP
Local time
Today, 18:20
Joined
May 23, 2011
Messages
4,726
Spikepl:
The buttons seem to work fine unless you select the first record and click cmdMoveUp which then throw an error number 3. This can be stopped by removing the following lines from the MoveUp function.
Code:
    Else
        Return

When trying to use the right button of the mouse to move up or down I get the following error message:
Access failed to evaluate one or more expressions because 'MoveUp' was referenced in an expression.

Only functions and properties that are considered to be safe are allowed in expressions when Access runs in sandbox mode.
 

spikepl

Eledittingent Beliped
Local time
Today, 19:20
Joined
Nov 3, 2010
Messages
6,142
Anyone?

Also, is there a way to make this tick without having to muck about with the registry?
 

spikepl

Eledittingent Beliped
Local time
Today, 19:20
Joined
Nov 3, 2010
Messages
6,142
Still unsolved, anybody with a magic touch out there?
 

Users who are viewing this thread

Top Bottom