Shortcut menu action syntax - on a control -
10-17-2008
, 11:08 AM
I have successfully added shortcut menus to Forms but I am now having
difficulty when I attach a shortcut menu to a text control. I have a
shortcut menu entitled 'CalendarEntries' with one command whose 'On
action' is =showAbsence().
The control is on a Pop up Form called 'Calendar' that has a function:
Public Function showAbsence()
......
End Function
The Shortcut Menu Bar property of the control is set to
'CalendarEntries'. The Shortcut Menu Bar property of the Form is not
set.
When I right click the control I get the error:
"The expression you entered has a function name that Microsoft Access
can't find"
If I change the On action to =Forms![Calendar].viewAbsence() the
correct function is activated but when it reaches its End statement, I
get the error:
"The expression you entered contains invalid syntax"
If I change it to =Forms![Calendar].viewAbsence ,it runs correctly
but three times!!
I have just noticed that the first version of the 'On action' (the one
I expected to work) does in fact work if I remove the Pop Up property
from the Form.
So how do I set up a shortcut menu on a control on a Pop up Form? |