You can use the REPLACE_MENU Built-in procedure to dynamically replace the current form's menu with a different menu:
For example, to replace the current menu with a menu called my_new_menu you could write the following procedure call:
REPLACE_MENU('my_new_menu');