AddDays(AddMonths(MakeDate(1, [Month], [Year]), 1), -1)
MakeDate(1, [Month], [Year]), 1) : This makes a date of the first day of whatever month/year you pass as parameter.
AddMonths(MakeDate(1, [Month], [Year]), 1) : Adds 1 month so it is the first day of the next month
AddDays(AddMonths(MakeDate(1, [Month], [Year]), 1), -1) : Subtracts 1 day so it is now the last day of the original month you passed.