What do you mean by "popup menu?" A Drop Down list? If that's what you mean, then you should be able to put the named query on the data property of the dropdown rather than the table.
This is a bit easier. Components have a property called "focus". On the Entry Field, set the "focusGained" handler to set the visibility of the dropdown/table to 1. Set the "focusLost" to set the visibility property to 0. My screenshot is setting the visibility property of a label.