You want to figure out what is going on with your shooting before you adjust anything on the gun.
Are both guns DA/SA, or is one or both of them DAO or DAK? Shoot in single action until you start to get your shots to group together decently. To hit where you are aiming, probably the most important thing is to try and think of your trigger finger as independent, and able to move independantly, of your strong hand and the way you hold the gun. For target shooting, you want to keep the gun as still as possible and just use enough force with your trigger finger to drop the hammer. Figure this out doing eveything really slowly before trying to get too fancy. All good shooting is built on good trigger control and keeping the gun as steady as possible (given the particular context... in some scearios it is going to be steadier than in others).
I find one thing that a lot of people do at first is grip the gun
way too hard with their strong hand. It will be very hard to pull the trigger and have the gun fire (anywhere close to where you are aiming) if you are white-knuckling the gun with your strong hand. The support should be coming from your weak hand. Get your thumbs both pointing down range and support the gun properly. This is how 90%-plus percent of people hold autoloaders:
Try and get high up on the gun. It's easier to control that way. You can see in this photo, even though the gun is recoiling it is still basically flat and on target. Don't try and keep the gun from moving when you shoot though. This will just cause you to develop bad flinches and push the gun down before shooting. By the time you feel the recoil the bullet is long gone. That is why triggers are key to accuracy, but grip and body position are key to follow-up shots.
People with really small hands, like my girlfriend, can shoot a bit more like this, but I still recommend trying to get as high up as possible
Before you adjust the sights, try this. If you are shooting high, do this:
If you are shooting really low, try this:
If this works then the position of the sights might have something to do with it - and you should be able to figure out roughly what changes need to be made. If it is still all over the place then you just need to work on your technique.
At the range you are shooting at you should be able to get small groups with these guns. I'm not bragging here - there are plenty of people that can do better (and particularly... just as good at a lot faster speeds) - but this is an example of the kind of groups I can get with my 229 in 9mm. This is 10 shots into an inch and a half centre-to-centre. 40 Smith is harder to get good with, but the difference between the two is not that extreme. Give yourself 6 months of practice and you will see a world of difference.