Cook onion and mushrooms in butter until onions are tender but not brown. Add more butter if using fresh mushrooms. Add ham and cream of mushroom soup. Cook in crockpot at setting 2 1/2 or 3 for 8 hours or on high for 3 to 4 hours. Turn heat down and add sour cream. Serve over noodles, rice or even potatoes. You can also spoon it into pastry shells. If you don't have a crockpot, you can bake this covered in a very slow oven for 3 - 4 hours.