Not to steal your thunder Ken, but might this be the sort of thing you are looking for? Supply the table name and name of your index field, it returns the next number.
Function GetTableIndex(GetTable As String, GetField As String) As Integer
'DATE: 04-17-08
'PURPOSE: get index number for a new record from the selected table & field
'NOTE: Function returns an integer
'YOU MAY USE THIS CODE, BUT YOU MUST CREDIT THE AUTHOR
'On Error GoTo ERR_HNDL
'DEFINE VARIABLES
'THIS MODULE CREATES THE INDEX NUMBER FOR NEW PTRs
Dim zst As DAO.Recordset 'TABLE CALLED FOR
Dim ErrorMessage As String 'for error reporting
'
'****************************************************************************************
Set zst = db.OpenRecordset(GetTable)
GetTableIndex = Nz(DMax("[" & GetField & "]", GetTable) + 1, 0)
'-----------------------------------------------------------------------------------
EXIT_SUB: 'CLEAR VARIABLES
zst.Close
Set zst = Nothing
DoCmd.SetWarnings True
ErrorMessage = ""
Exit Function
ERR_HNDL:
ErrorMessage = "Function GetTableIndex" & vbCr & "ERROR# " & Err.Number & vbCr & Err.Description
Call PlayMySound("fault.wav", SND_ASYNC) 'SND_SYNC) SND_LOOP)
Call ErrorReport(ErrorMessage)
Resume EXIT_SUB
End Function