Sunan an-Nasa'i, Book 51, Hadith 122 (Nasa'i 5670)

It was narrated from Abu Hurairah that:

The Prophet said: "The adulterer is not a believer at the moment when he is committing adultery, and the thief is not a believer at the moment when he is stealing, and the wine drinker is not a believer at the moment when he is drinking wine, and the robber is not a believer at the moment when he is robbing and taking something valuable by force while the Muslims are looking at it.'"