>>1202 Yes, you can use a special conversion barrel to shoot 9mm out of a .40 Glock just as you can use an entire 9mm G17 slide (the upper metal part) on a .40 G22 frame (the lower polymer part). I have no experience with it but it should work reasonably well. The ejector of a .40 Glock frame is not designed for 9mm but how much of an issue that is remains debatable. May eject brass in your face at worst but that's all. Recoil springs of new .40 guns may be too strong to reliably eject 9mm rounds as well but that rarely seems to happen. https://www.glocktalk.com/threads/long-term-experience-with-40-to-9mm-conversions.1699423/
The more serious question is - WHY would you do that? It makes sense in Germany for legal reasons as it's far easier to buy an additional barrel / slide than getting a permit for a second gun. But in the US? I dunno how much these special replacement barrels cost but the cost of the entire slide is only marginally less than an entire gun. My guess is you could almost get a used Glock for the price of the replacement barrel.
So seriously - money is not an issue for you and Glocks don't cost a fortune, especially used. Why not get both? A G22 in .40 as you're so fixated on that caliber for whatever reason and a G17 in 9mm. Or maybe a compact G19 for concealed carry in contrast to the large and heavy G22. Anyway, what's better than a Glock? 2 Glocks!
Then you have two serious and reliable pistols not one and a half. In case something breaks or you lose parts you still have a secondary gun and many parts are even interchangeable between G17 and G22 right down to using the G17 slide on the G22 frame. Doesn't get more apocalypse-proof than this.
Bottom line - guns are not the right subject for extreme bargaining and funny experiments, especially as a total beginner. A conversion barrel is always a gamble. It should work well in theory, but it still may cause issues. I wouldn't do it just to save a few hundred bucks and I certainly wouldn't bet my and host's life on such setup.
If you really wanna save money, look if you can get a G22 from LEA trade-ins, law enforcement went to 9mm and sold lots of G22 for cheap money.
And I can only say it again - go to a gun dealer and take those guns into your hand first / shoot them at a range. Then decide what's best for you. G22, G17 or compact G19. The .40 and 9mm. Just give all options a go.
If you still decide to go for a conversion barrel don’t ask me which, no idea.