Assuming that you have a field in the InvoiceInfo table that indicates the year somehow, you can alter your Select statement to only return the values for that year, eg:
Code:
"SELECT TOP 1 Inv_ID FROM InvoiceInfo WHERE yearField = 2022 ORDER BY Inv_ID DESC"
..if the field is a DateTime, you can use the Year function to check just the year:
Code:
"SELECT TOP 1 Inv_ID FROM InvoiceInfo WHERE Year(dateField) = 2022 ORDER BY Inv_ID DESC"