I know this is simple but I can't seem to get it to work.
Do you know if you are having hardware or software issues?
How is the switch wired to the handheld unit?
How are the XBees configured?
You've described what you want to have happen, but not what really does happen. It's hard to guess where the problem is, knowing only half the story.