yeah thats the problem because iam using acces 2010 and iam planing to get 2013 new release
i saw it in a lot of sample databases working 100% but i want to know the way
I haven't tried your code out but I do know that, in 2007 at least, and I do believe it will work in 2010, the tried and true method of building the shortcut menu via two macros is still valid. One to have the commands and then other one to encapsulate that other macro using the AddMenu command. And then setting the Shortcut Menu property of the form, report, or control to the name of that 2nd macro.
My digging around has found that these menus created in A2003 do work in A2007 on wards. However it seems that one can not longer use the same method in A7 onward. The solution that I came across says to use A2003 to create the menus and then import them into A2007+.
Whilst this may work it does not really answer the question of how to create these menus in A2007+. Personally I'm surprised that there is not a easy way to do these very useful pop up menus.
You can create new menus in Access 2007 just as you could in 2003. 2010 may not be the same and I have not had opportunity to try yet. But I have created menus in Access 2007 the old way as I described earlier.