dbTalk Databases Forums  

Shortcut menu action syntax - on a control

comp.databases.ms-access comp.databases.ms-access


Discuss Shortcut menu action syntax - on a control in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jim Devenish
 
Posts: n/a

Default 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?



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.