应该为:
1/rst.Open "select * from pwd where id='" & txtid.Text & "'", cnn, adOpenDynamic, adLockOptimistic
2/If not(rst.EOF And rst.BOF) Then
message = "该用户已经存在,我们建议你使用别的名称"
emptydata
txtid.SetFocus
rst.MoveLast
3/Else
With rst
.AddNew
1/rst.Open "select * from pwd where id='" & txtid.Text & "'", cnn, adOpenDynamic, adLockOptimistic
2/If not(rst.EOF And rst.BOF) Then
message = "该用户已经存在,我们建议你使用别的名称"
emptydata
txtid.SetFocus
rst.MoveLast
3/Else
With rst
.AddNew
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货