Horny but not hard?

My boyfriend gets horny but every time we go to do something sexual, he can't get hard anymore like everything is switched off. Why is this happening?!