Fred has been thinking all day that he needed to do something.
Fred is glad he remembered what he needed to do.
Fred still could not remember what it was.
Fred finally remembered it was to buy some eggs.