Walther P99 in .40SW was the first handgun I bought a few years ago. With little experience, I bought it primarily for the Walther name/rep and the look of the gun (in my opinion still the best looking tupperware available). Despite a lot of experience shooting rifles and air pistols I quickly discovered how difficult it was to shoot handguns with consistent accuracy. I chalked this up to my inexperience for awhile, but after a year or so and only minor improvement I started to wonder about the gun. However, with zero malfunctions, pristine barrel, and overall tight condition, I had trouble accepting that it could be the gun itself.
Eventually I started suspecting that the relatively light weight of the polymer pistol and the stout .40SW recoil might be the issue for me. I then acquired a CZ SP-01 and CZ97B. This was a revelation. Those 40+ oz guns launched their 9mm and .45 loads with far more consistent accuracy. Then I bought a Sig 226R Stainless in .40SW for an "apples-to-apples" comparison with the P99 caliber-wise. Well, that Sig (which approaches twice the weight of the P99) is the most accurate pistol I own by a small margin over the CZ97B and the Walther doesn't even come close.
Since then I have added grip tape, a progressive recoil spring and thumb rest (to control muzzle flip) to my P99 and this has actually helped quite a bit. These mods, along with more range time, have gotten my groups to an acceptable level for me, but alas that sweet-looking Walther is still in fourth place in my collection. In my opinion the inherent accuracy of the Walther P99 is probably as good as any and better than most, but its practical accuracy is lacking. If you have a lot of experince with polymer handguns and/or the willingness to practice your technique, you may be quite happy with it. I would still definitely look at the 9mm over the .40SW in this pistol.