The Book Pertaining to the Excellent Qualities of the Holy Prophet (may Peace be upon them) and His Companions (Kitab Al-Fada'il)
Muslim :: Book 30 : Hadith 5820
This hadith has been narrated by Abu Huraira through a different chain of transmitters (and the words are) that he reported Allah's Messenger (may peace be upon him) having said: Abandon that which I have asked you to abandon, for the people before you went to their doom (for asking too many questions).