For Each dr As DataRow in dt1.DataRows
If dt1.Compute("count(身份证)", "身份证 = '" & dr("身份证") & "'") > 1 Then
msgbox("有重复记录")
End If
Next