No situation in English speech and writing causes more difficulty for more persons than choosing between who and whom (and whoever, whomever when they are used). Current usage studies indicate that the distinction between these forms is breaking down, partly because keeping them straight is difficult and partly because many speakers begin a sentence or clause with who, not knowing how they are going to end the statement. Because most people consider whom less natural than who, they sometimes disregard grammatical requirements and use who even when whom is clearly indicated. The grammatical rule is simple: use who (or whoever) as the subject of a verb or as a predicate pronoun. Use whom (whomever) as the object of a verb or preposition. Here are some correct illustrations.
1. The question of who can go is unimportant. (Here, who is the subject of can go. The entire clause, who can go, is the object of the preposition of.)
2. This is the fireman whom we saw on top of the building. (Here, whom is the object of saw.)
3. He asked me who I thought would be elected. (The case of a pronoun depends upon its use and should not be influenced by words that come between it and its antecedent. Check this sentence by omitting I thought. Who is then seen to be the subject of would be elected.)
4. I danced with the girl whom everyone suspected the committee had chosen Beauty Queen. (Here, check by omitting everyone suspected.)
When doubtful, substitute he or him for who or whom to arrive at a decision:
1. Who/whom are you voting for? (For who/whom are you voting?) He/him are you voting for? (For he/him are you voting?)
2. This is the kind of public servant who/whom we need. (... we need who/whom;... we need he/him.)
One final word: unless you are reasonably certain that whom is required, use who. You'll be right much more than half of the time. See also that.
Dictionary of problem words and expressions. Harry Shaw. 1975.