You can use this function - you need to modify the DMAx command to use your own field name and table.
Function NextVal()
' assumes format is always like IRP0001_R01_170710
Dim lastval
Dim first As String
Dim second As String
Dim third As String
lastval = Nz(DMax("IDFieldname", "tblA", "left(IDfieldname,3) = 'IRP'"), "") ' modify this line
If lastval = "" Then
MsgBox "No Previous Value"
NextVal = ""
Exit Function
End If
first = "IRP" & Format(Val(Mid(lastval, 4)) + 1, "0000") & "-"
second = Mid(lastval, 9, 4)
third = Format(Date, "DDMMYY")
NextVal = first & second & third
End Function