Man is a being of imperfection, while Allah alone is self-sufficient. This is because Allah created man with weaknesses. One of man's weaknesses is forgetfulness; no one is free of it, no matter how intelligent he may be.
Admitting this weakness makes one acknowledge his dependence upon Allah. In a way, that is because a person can claim to exist only through his memory. All the information related to his identity, beliefs, deeds, pleasures, habits and way of life are held in memory.
However, Allah may allow one to forget the end of the sentence he is speaking, and, if He wills, can make him forget his entire life in an instant. In order to be aware of himself, man is in need of Allah, Who permits him to keep information in his memory at every moment. If Allah should take a piece of information from a person’s mind, he will have no power whatsoever to retrieve it. In such a state of helplessness, everyone should take refuge in Allah and seek His help:
… Remember your Lord when you forget, and say, ‘Hopefully my Lord will guide me to something closer to right guidance than this.’ (Surat al-Kahf; 24)
Remembering something that one has forgotten and succeeding in any particular objective is possible only by Allah’s will. Therefore, the only recourse is to pray for guidance.