IIF(LEN([ID])=18,
IIF(
((Convert(SUBSTRING([ID],1,1),System.Int16)*7+
Convert(SUBSTRING([ID],2,1),System.Int16)*9+
Convert(SUBSTRING([ID],3,1),System.Int16)*10+
Convert(SUBSTRING([ID],4,1),System.Int16)*5+
Convert(SUBSTRING([ID],5,1),System.Int16)*8+
Convert(SUBSTRING([ID],6,1),System.Int16)*4+
Convert(SUBSTRING([ID],7,1),System.Int16)*2+
Convert(SUBSTRING([ID],8,1),System.Int16)*1+
Convert(SUBSTRING([ID],9,1),System.Int16)*6+
Convert(SUBSTRING([ID],10,1),System.Int16)*3+
Convert(SUBSTRING([ID],11,1),System.Int16)*7+
Convert(SUBSTRING([ID],12,1),System.Int16)*9+
Convert(SUBSTRING([ID],13,1),System.Int16)*10+
Convert(SUBSTRING([ID],14,1),System.Int16)*5+
Convert(SUBSTRING([ID],15,1),System.Int16)*8+
Convert(SUBSTRING([ID],16,1),System.Int16)*4+
Convert(SUBSTRING([ID],17,1),System.Int16)*2)%11)=2,'X',
IIF(
((Convert(SUBSTRING([ID],1,1),System.Int16)*7+
Convert(SUBSTRING([ID],2,1),System.Int16)*9+
Convert(SUBSTRING([ID],3,1),System.Int16)*10+
Convert(SUBSTRING([ID],4,1),System.Int16)*5+
Convert(SUBSTRING([ID],5,1),System.Int16)*8+
Convert(SUBSTRING([ID],6,1),System.Int16)*4+
Convert(SUBSTRING([ID],7,1),System.Int16)*2+
Convert(SUBSTRING([ID],8,1),System.Int16)*1+
Convert(SUBSTRING([ID],9,1),System.Int16)*6+
Convert(SUBSTRING([ID],10,1),System.Int16)*3+
Convert(SUBSTRING([ID],11,1),System.Int16)*7+
Convert(SUBSTRING([ID],12,1),System.Int16)*9+
Convert(SUBSTRING([ID],13,1),System.Int16)*10+
Convert(SUBSTRING([ID],14,1),System.Int16)*5+
Convert(SUBSTRING([ID],15,1),System.Int16)*8+
Convert(SUBSTRING([ID],16,1),System.Int16)*4+
Convert(SUBSTRING([ID],17,1),System.Int16)*2)%11) IN ('1','0')
,1-
((Convert(SUBSTRING([ID],1,1),System.Int16)*7+
Convert(SUBSTRING([ID],2,1),System.Int16)*9+
Convert(SUBSTRING([ID],3,1),System.Int16)*10+
Convert(SUBSTRING([ID],4,1),System.Int16)*5+
Convert(SUBSTRING([ID],5,1),System.Int16)*8+
Convert(SUBSTRING([ID],6,1),System.Int16)*4+
Convert(SUBSTRING([ID],7,1),System.Int16)*2+
Convert(SUBSTRING([ID],8,1),System.Int16)*1+
Convert(SUBSTRING([ID],9,1),System.Int16)*6+
Convert(SUBSTRING([ID],10,1),System.Int16)*3+
Convert(SUBSTRING([ID],11,1),System.Int16)*7+
Convert(SUBSTRING([ID],12,1),System.Int16)*9+
Convert(SUBSTRING([ID],13,1),System.Int16)*10+
Convert(SUBSTRING([ID],14,1),System.Int16)*5+
Convert(SUBSTRING([ID],15,1),System.Int16)*8+
Convert(SUBSTRING([ID],16,1),System.Int16)*4+
Convert(SUBSTRING([ID],17,1),System.Int16)*2)%11)
,12-
((Convert(SUBSTRING([ID],1,1),System.Int16)*7+
Convert(SUBSTRING([ID],2,1),System.Int16)*9+
Convert(SUBSTRING([ID],3,1),System.Int16)*10+
Convert(SUBSTRING([ID],4,1),System.Int16)*5+
Convert(SUBSTRING([ID],5,1),System.Int16)*8+
Convert(SUBSTRING([ID],6,1),System.Int16)*4+
Convert(SUBSTRING([ID],7,1),System.Int16)*2+
Convert(SUBSTRING([ID],8,1),System.Int16)*1+
Convert(SUBSTRING([ID],9,1),System.Int16)*6+
Convert(SUBSTRING([ID],10,1),System.Int16)*3+
Convert(SUBSTRING([ID],11,1),System.Int16)*7+
Convert(SUBSTRING([ID],12,1),System.Int16)*9+
Convert(SUBSTRING([ID],13,1),System.Int16)*10+
Convert(SUBSTRING([ID],14,1),System.Int16)*5+
Convert(SUBSTRING([ID],15,1),System.Int16)*8+
Convert(SUBSTRING([ID],16,1),System.Int16)*4+
Convert(SUBSTRING([ID],17,1),System.Int16)*2)%11)
))
,IIF(LEN([ID])=15,
IIF(
((Convert(SUBSTRING([ID],1,1),System.Int16)*7+
Convert(SUBSTRING([ID],2,1),System.Int16)*9+
Convert(SUBSTRING([ID],3,1),System.Int16)*10+
Convert(SUBSTRING([ID],4,1),System.Int16)*5+
Convert(SUBSTRING([ID],5,1),System.Int16)*8+
Convert(SUBSTRING([ID],6,1),System.Int16)*4+
2+
9+
Convert(SUBSTRING([ID],7,1),System.Int16)*6+
Convert(SUBSTRING([ID],8,1),System.Int16)*3+
Convert(SUBSTRING([ID],9,1),System.Int16)*7+
Convert(SUBSTRING([ID],10,1),System.Int16)*9+
Convert(SUBSTRING([ID],11,1),System.Int16)*10+
Convert(SUBSTRING([ID],12,1),System.Int16)*5+
Convert(SUBSTRING([ID],13,1),System.Int16)*8+
Convert(SUBSTRING([ID],14,1),System.Int16)*4+
Convert(SUBSTRING([ID],15,1),System.Int16)*2)%11)=2,'X',
IIF(
((Convert(SUBSTRING([ID],1,1),System.Int16)*7+
Convert(SUBSTRING([ID],2,1),System.Int16)*9+
Convert(SUBSTRING([ID],3,1),System.Int16)*10+
Convert(SUBSTRING([ID],4,1),System.Int16)*5+
Convert(SUBSTRING([ID],5,1),System.Int16)*8+
Convert(SUBSTRING([ID],6,1),System.Int16)*4+
2+
9+
Convert(SUBSTRING([ID],7,1),System.Int16)*6+
Convert(SUBSTRING([ID],8,1),System.Int16)*3+
Convert(SUBSTRING([ID],9,1),System.Int16)*7+
Convert(SUBSTRING([ID],10,1),System.Int16)*9+
Convert(SUBSTRING([ID],11,1),System.Int16)*10+
Convert(SUBSTRING([ID],12,1),System.Int16)*5+
Convert(SUBSTRING([ID],13,1),System.Int16)*8+
Convert(SUBSTRING([ID],14,1),System.Int16)*4+
Convert(SUBSTRING([ID],15,1),System.Int16)*2)%11) IN ('1','0')
,1-
((Convert(SUBSTRING([ID],1,1),System.Int16)*7+
Convert(SUBSTRING([ID],2,1),System.Int16)*9+
Convert(SUBSTRING([ID],3,1),System.Int16)*10+
Convert(SUBSTRING([ID],4,1),System.Int16)*5+
Convert(SUBSTRING([ID],5,1),System.Int16)*8+
Convert(SUBSTRING([ID],6,1),System.Int16)*4+
2+
9+
Convert(SUBSTRING([ID],7,1),System.Int16)*6+
Convert(SUBSTRING([ID],8,1),System.Int16)*3+
Convert(SUBSTRING([ID],9,1),System.Int16)*7+
Convert(SUBSTRING([ID],10,1),System.Int16)*9+
Convert(SUBSTRING([ID],11,1),System.Int16)*10+
Convert(SUBSTRING([ID],12,1),System.Int16)*5+
Convert(SUBSTRING([ID],13,1),System.Int16)*8+
Convert(SUBSTRING([ID],14,1),System.Int16)*4+
Convert(SUBSTRING([ID],15,1),System.Int16)*2)%11)
,12-
((Convert(SUBSTRING([ID],1,1),System.Int16)*7+
Convert(SUBSTRING([ID],2,1),System.Int16)*9+
Convert(SUBSTRING([ID],3,1),System.Int16)*10+
Convert(SUBSTRING([ID],4,1),System.Int16)*5+
Convert(SUBSTRING([ID],5,1),System.Int16)*8+
Convert(SUBSTRING([ID],6,1),System.Int16)*4+
2+
9+
Convert(SUBSTRING([ID],7,1),System.Int16)*6+
Convert(SUBSTRING([ID],8,1),System.Int16)*3+
Convert(SUBSTRING([ID],9,1),System.Int16)*7+
Convert(SUBSTRING([ID],10,1),System.Int16)*9+
Convert(SUBSTRING([ID],11,1),System.Int16)*10+
Convert(SUBSTRING([ID],12,1),System.Int16)*5+
Convert(SUBSTRING([ID],13,1),System.Int16)*8+
Convert(SUBSTRING([ID],14,1),System.Int16)*4+
Convert(SUBSTRING([ID],15,1),System.Int16)*2)%11)
))
,''))
-----------------------------------------------------------------------------------------------------------------------
以上是校正码表达式代码,谁能帮忙改成用表事件DataColChanged的代码解决