Sleeping in swing

My 5 month old will scream for hours in his crib at night and will sleep maybe 20-30 minutes in his crib after his screaming fits but he sleeps ALL night in his swing. Am I wrong for just letting him slee where he will sleep? He has gone over two weeks with hardly any sleep ( 3/4 hours a day. If that) because he refuses to sleep in his crib. He has to sleep so I'm lost in what to do because I know letting them sleep in their swing is bad but I don't know what else to do