Add the little red code to complete the comparison. The type mismatch is between Boolean and numeric.
Code:
Private Sub Nama_AfterUpdate()
Dim NewNama As String
Dim stLinkCriteria As String
Dim IDProduk As Integer
NewNama = Me.Nama.Value
stLinkCriteria = "[nama] = '" & NewNama & "'"
If DCount("*", "tblproduk", stLinkCriteria) > 0 Then 'kelampaian
MsgBox "Nama Spesis ini, " & NewNama & ", Telah wujud dalam Database." _
& vbCr & vbCr & "Sila semak semula Nama Spesis...!", vbInformation, "Duplicate information"
'Me.Undo
End If
IDProduk = DLookup("(Idproduk)", "tblproduk", stLinkCriteria)
Me.DataEntry = False
DoCamd.FindRecord IDProduk, , , , , acCurrent
End Sub