Does your other fob work correctly? If so, maybe the battery in the non-working fob needs replacing. If the battery is OK, maybe the fob electronics have failed. If so, it should be under warranty unless the fob has gotten wet, its case has broken, etc.
Do you mean that Comfort Access (i.e., unlocking of the doors by merely grabbing the door handle) is no longer working? Are you still able to start your car with this fob in your purse?