You can't actually capture the subref with arguments in this manner. It's actually calling the sub immediately and your callback ends up being a reference to whatever is returned by your sub. To get around this, Tk callbacks accept the subref and arguments as an anonymous arrayref.
See 'perldoc Tk::callbacks' for details but what you want is:
$action->command(-label=>"Sort by Number", -command => [\&queryDB, 'it
+em_number']);
... and likewise for the other.
- danboo