http://revach.net/tefila/article.php?id=5324

Section: Halacha   Category: Tshuvos
Kiddush on Shabbos: Forgetting the Wine During your Bracha Achrona
If one drinks the shiur of wine during kiddush and then eats cake, the bracha achrona is Al HaMichya while adding Al HaGefen as well. What happens if he makes an Al HaMichya and forgets about the wine, must he make a separate Al HaGefen?

Rav Moshe Shternbuch (Tshuvos V'Hanhagos 2:147) says that the Be'er Heitev (OC 208:23) says that if you drink wine and make an Al HaMichya, it suffices for the wine as well, even if you didn't say Al HaGefen. This however is when you were aware you drank wine and mistakenly said the wrong Bracha Achrona. But if you forgot you drank wine, would Al Hamichya on cake suffice for the wine as well?

He says this is a machlokes between Hagr"i Zilberman and Rav Eliyahu Rom. In a similar case where someone makes a Borei Pri Ho'adama on a fruit, he is only yotzei if he clearly meant to make the Hoadama on the fruit he planned on eating. However says Rav Shternbuch this case is different since a Bracha Rishona goes on the food you intend to eat whereas Bracha Achrona goes on everything you have eaten, so specific intent is not necessary.

Rav Shternbuch says however that it seems from the Mishna Brura that even for Bracha Achrona you need to have in mind which food you are making the bracha on. The Piskei Tshuvos brings that most poskim hold like the Pri Megadim that you don't need to say Al HaGefen again, and you are yotzei with Al HaMichya. He adds that even if you only remember at the end, in the Chasima, it is good to end by saying Al HaMichya V'Al Pri HaGefen, even though you didn't mention Gefen in the body of Al HaMichya itself.

Important Note: We bring this tshuvah as a starting point for discussion and not to convey any halacha. We try to convey the Tshuva to the best of our ability. We admit that our understanding may not be accurate. One should learn the tshuva to verify the accuracy of our interpretation. Please understand that this Tshuva may not be the final word on this topic. One should consult a Rav before drawing any conclusions.