Praise be to Allah.
It was narrated by Abu Dawood (3767), at-Tirmidhi (1858) and Ibn Maajah (3264) from ‘Aa’ishah (may Allah be pleased with her) that the Messenger of Allah (blessings and peace of Allah be upon him) said: “When one of you eats, let him mention the name of Allah. If he forgets to mention the name of Allah at the beginning, let him say: In the name of Allah at the beginning and at the end (Bismillahi awwalahu wa aakhirahu).”
Classed as saheeh by al-Albaani in Saheeh Abi Dawood.
According to another version: “Bismillah fi awwalihi wa aakhirihi.”
Ibn Hibbaan (5213) narrated that ‘Abdullah ibn Mas‘ood said: The Messenger of Allah (blessings and peace of Allah be upon him) said: “Whoever forgets to mention Allah at the beginning of his meal, let him say when he remembers, ‘Bismillah fi awwalihi wa aakhirihi’, for after that it will be like a new meal and that will cancel out any evil that had already befallen him.
Classed as saheeh by al-Albaani in as-Saheehah (198).
Food and drink all the same in this regard.
Al-Mannaawi (may Allah have mercy on him) said:
Drink is like food.
Fayd al-Qadeer (1/296).
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said:
The word ta‘aam (often translated as food) refers to anything that has a taste; it may be drink or it may be food. The evidence that drinks may be called tu‘m or ta‘aam is the verse in which Allah, may He be blessed and exalted, says (interpretation of the meaning):
“So whoever drinks thereof, he is not of me, and whoever tastes it not [wa man lam yat‘amhu], he is of me, except him who takes (thereof) in the hollow of his hand”
Sharh Riyadh as-Saaliheen (4/187).
The Sunnah was narrated with regard to eating, and drinking comes under the same ruling.
As for actions other than eating and drinking, such as studying, cleaning, cooking, getting dressed and so on, then what appears more likely to be the case – and Allah knows best – is that no analogy can be made with eating and drinking in this regard. Rather if one forgets to mention the name of Allah when starting to do it, then remembers it whilst doing it, then he should mention His name (by saying Bismillah), without adding the words “awwalahu wa aakhirahu (at the beginning and the end of it)”, and he does not have to do anything apart from that.
Shaykh Ibn Baaz (may Allah have mercy on him) said:
If you forget to mention the name of Allah when starting to do wudoo’, then you remember it partway through, you should mention His name, and you do not have to repeat the first part of your wudoo’, because you are excused for having forgotten. End quote.
The scholars of the Standing Committee for Issuing Fatwas said:
It is prescribed to mention the name of Allah (by saying Bismillah) when starting to do wudoo’, but if one forgets, then remembers it during wudoo’, he should mention His name then carry on with his wudoo’. If he does not remember it until after he has finished it, then his wudoo’ is valid and he does not have to repeat it. End quote.
Fataawa al-Lajnah ad-Daa’imah (4/73)
For more information, please see: al-Majmoo‘ Sharh al-Muhadhdhab by an-Nawawi (1/344-345)
And Allah knows best.