I mocked up your main routine as best I could.
Code:
'---------------------------------------------------------------------------------------
' Procedure : GinaM
' Author : mellon
' Date : 21/02/2016
' Purpose : This is a mockup of Gina's main routine for debugging pirposes.
'https://www.accessforums.net/showthread.php?t=58262&p=311736#post311736
'---------------------------------------------------------------------------------------
'
Sub GinaM()
Dim db As Database
10 On Error GoTo GinaM_Error
'''Your code commented
'Set db = CurrentDb
'Dim RS As Recordset
'Dim LNGID As Long
'LNGID = Next_Custom_Counter()
'Debug.Print LNGID
'
'Set RS = db.OpenRecordset("tblProcessEntry")
'RS.AddNew
'RS![id] = [LNGID]
'RS![COURT] = [COURT]
'RS![Case] = [Case]
'RS!Priority = Priority
'RS!EXPDATE = EXPDATE
'RS!EXPTIME = EXPTIME
'RS!RE_ONE = RE_ONE
'RS!PLAINTIFF = PLAINTIFF
'RS!RE_TWO = RE_TWO
'RS!DEFENDANT = DEFENDANT
'RS![FOR] = [FOR]
'RS!BILLTO = BILLTO
'RS!INVOICEEMAIL = INVOICEEMAIL
'RS!DATE_RECEIVED = DATE_RECEIVED
'RS!TIME_RECEIVED = TIME_RECEIVED
'RS!Documents = Documents
'RS.Update
'RS.MoveLast
'RS.Close
'Me.Refresh
'DoCmd.GoToRecord , mainprocessentry, acLast
'''my mockup
Dim rs As Recordset
20 Set db = CurrentDb
Dim LNGID As Long
30 LNGID = Next_Custom_Counter()
40 Debug.Print LNGID
'
'Using my table ancestor to add some records
' name Text
' id Double
' deathdate Date
' birthdate Date
50 Set rs = db.OpenRecordset("ancestor")
60 rs.AddNew
70 rs![id] = [LNGID]
80 rs![birthdate] = #7/21/1937#
90 rs![deathdate] = #3/19/2009#
100 rs![name] = "TestPerson" & CStr(LNGID)
110 rs.Update
120 rs.MoveLast
'rs.Close
'Me.Refresh
' DoCmd.GoToRecord , "ancestor", acLast
122 Debug.Print "The latest id added was " & rs!id 'Got here using rs.Movelast .................
130 Debug.Print "The latest id added -using Dmax - was " & DMax("id", "ancestor")
140 On Error GoTo 0
150 rs.Close
160 Exit Sub
GinaM_Error:
170 MsgBox "Error " & Err.Number & " in line " & Erl & " (" & Err.Description & ") in procedure GinaM of Module AWF_Related"
End Sub
The output for the Debug.print for the last 2 records added was
175
The latest id added was 175
The latest id added -using Dmax - was 175
176
The latest id added was 176
The latest id added -using Dmax - was 176