Flummuxable as it is, there is a rule, but I can never remember it. This is a quote from www.grammarbook.com:
“Use the he/him method to decide which word is correct.
he = who
him = whom\
Examples:Where I get in trouble is when I try to remember, “is ‘he’ who or whom?” A rule isn't a good rule if it can’t be remembered.
Who/Whom wrote the letter?
He wrote the letter. Therefore, who is correct.
For who/whom should I vote?
Should I vote for him? Therefore, whom is correct.
We all know who/whom pulled that prank.
This sentence contains two clauses: We all know and who/whom pulled that prank. We are interested in the second clause because it contains the who/whom. He pulled that prank. Therefore, who is correct. (Are you starting to sound like a hooting owl yet?)
We want to know on who/whom the prank was pulled.
This sentence contains two clauses: We want to know and the prank was pulled on who/whom. Again, we are interested in the second clause because it contains the who/whom. The prank was pulled on him. Therefore, whom is correct.”
*According to my American Heritage Dictionary, “flummox” is slang, and means to “confuse; perplex (orig. unknown)” Flummox and flummoxing, used above, are words, but I have coined a new word, flummoxable, which probably won't enter the language anytime soon. It doesn’t help that flummox as a word flummoxes people, who don’t know what it means. It’s one of the reasons to avoid slang if possible, and also clichés. I might not know what their general meaning to others is. I'd be embarrassed to list all of the slang I don’t know, but going back to 1965 I was totally flummoxed by “out of sight.” It was the title of a song by James Brown, but also used in conversation, "Man! That chick is outtasight!” I finally tumbled to the phrase meaning “beyond good.” I thought for a long time it meant the person being referred to was beyond the field of vision.
Here's the late James Brown when he was pretty much outtasight himself.
Speaking of songs flummoxing up the works, Stevie Wonder's song “Uptight,” flummoxed my old Army first sergeant. In the song Stevie sings, “Baby, everything is all right, uptight, outtasight... Sarge took it to mean that to be “uptight” was to be all right. So he would ask, “How's it goin' there, Postino? Everything uptight with you?” (His meaning, to which I would reply using my meaning, the one the word really referred to, Stevie Wonder notwithstanding:) "Sure, Sarge, I'm as uptight as I can be.”