I struggled with this issue a few months ago myself.
There's a hotkey to turn this setting on/off while MAMe is running, press ScrollLock.
If you want to make this permanent, enable MAME partial keyboard emulation setting... open mame.ini and change the value from 0 to 1. This setting is disabled by default and it only affects console/computer machines. It does nothing for arcade machines.
Then MAME menu will work (TAB key).
Be aware, depending on the computer machine being emulated, some keys from the emulated machine will not work when this setting is enabled.
Ciro Alfredo Consentino
EmuCon Home: http://emuloader.mameworld.info/emucon
MCM Plus: http://mcm.mameworld.info