Sahih Muslim Book 33, Hadith Number 6402.
Chapter : The growth of a child in the womb of a mother and his destiny in regard to his livelihood, his deeds. both good and evil.
Jabir reported that Suriqa b. Malik b. Ju’shuin came and said: Allah’s Messenger, explain our religion to us (in a way) as if we have been created just now. Whosoever deeds we do today, is it because of the fact that-the pens have dried (after recording them) and the destinies have began to operate or these have effects in future? Thereupon he said: The pens have dried and destinies have begun to operate. (Suraqa b. Malik) said: If it Is so, then what is the use of doing good deeds? Zuhair said: Then Abu Zubair said something but I could not understand that and I said. What did he say? Thereupon he said: Act, for everyone is facilitated what he intends to do.