Without knowing more details of exactly what you are doing I can only give parts to help you. Not a working solution.
What I posted about a query was only the criteria (Where) part of a query.
A query would look something like
Select [MyPrimaryKey], OPENDT, LASTDISBDT from [MyTableWithDates] where (Month(OPENDT) = Month(LASTDISBDT)) And (Year(OPENDT) = Year(LASTDISBDT))
You will need to dd additional fields as needed. You may also need to add additional tables to get the two dates you want to compare.