For i = 1 To .Rows - 1
dim s as integer,s1 as integer
s=.TextMatrix(i, 2)
s1=s=.TextMatrix(i, 2)
sqltext = "update ckc set 货号= " & s & " where id1= " & s1 & ""
Set rs = ExecuteSQL(sqltext, MsgString)
Next i
'建议更新完成后在刷新下mshflex表
rs.open "select * from ckc ",1,3
set .datasource=rs '重新加载mshflex表
MsgBox "数据保存完成", vbInformation, "提示
sqltext="update ckc set 货号='"& .textmatrix(i,2) & "' where id1=" & .textmatrix(i,1)