@Pawtang - You could easily test each part of your expression in the immediate window.
For example, using the first part of your posted expression where I substitute the function for a value:
?DateAdd("m",-2,Date())
3/11/21
So that's not right.
And the suggested expression:
?DateAdd("d", -1, DateAdd("m", 1,txtStartDate))
1/29/1900
and what should work:
DateSerial(Year(Date), Month(Date) - 2, 1)
EDIT - BTW, your second half doesn't give you the last day of the previous month either, which is mentioned in your post title. For that you need to subtract 1.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.