I would not place the following in the OnChange event of a control. Instead, I would use AfterUpdate of the Control.
Form.[ClassCode] = Mid(Form.[FertilizerHS], 1, 4)
I revised the code in post #5 so it includes your Mid() function vs. my Left() function and included the revision below. Also, I assigned the variable strResult to your field. Another thing I did was add some code that you may want to uncomment. It is the If Else statement that acts as a gated check to make sure FertilizerHS has a value.
Code:
'if isnull(Form.[FertilizerHS]) then
'exit sub
'end if
'Dim strCheck As String
Dim strResult As String
'strCheck = Me.txtInput.Value
strResult = Mid(Form.[FertilizerHS], 1, 4)
Select Case strResult
Case 3101, 3102, 3103, 3104, 3105
strResult = strResult
Case Else
strResult = "0000"
End Select
Form.[ClassCode] = strResult