9mm is great, .45 is great, but .40 offers no less than those rounds in my - relatively educated - opinion.
No less, yes...but no more either. IMHO, .40 offers two distinct disadvantages compared to the similarly sized 9mm. Greater (excessive, I think) recoil, and lower capacity in otherwise identical pistols. This, coupled with great advances in 9mm ammunition, are the reasons for declining popularity in .40 caliber.
Around where I live, I can't find many 9mm pistols in stock, but if you want a .40, dealers have plenty.