Purpose seems to be to add leading zeros to the existing IdField to make its length equal 9 characters.
Don't know if this will fix the problem, but might make it easier to debug.
Also, the STRING function was introduced in AC2013. If your runtime version predates that it would fail.
In that case, you could try some alternate code to add the leading zeros without the STRING function.
Code:
Public Sub SetId_9(tblName As String, IdField As String)
Dim SQL As String
Dim arg As String
if len(IdField) > 9 then
msgbox "Length > 9"
exit sub
end if
arg = String(9 - Len(IdField), "0") & IdField
Debug.Print arg
SQL = "UPDATE " & tblName & " SET " & IdField = arg
Debug.Print SQL
Currentdb.Execute SQL
End Sub