I do this sort of thing quite a lot. I created a function to do this.
Public Function GetNextIndex(strPrefix As String, strTargetTable As String, strFieldName As String) As String
    Dim db As Database
    Dim rs As Recordset
    Dim strSQL As String
    Dim strNumber As String
    Dim...