谢谢作者: hi-wzj 时间: 2005-2-7 07:21
用dcount函数可以读取符合条件的记录数。作者: garyding 时间: 2005-2-7 16:58
thx for ur reply,need to know some detail about Dcount Function...thx a lot作者: 罗生门 时间: 2005-2-7 18:13
如果你是窗体的话,可以设置代码private sub controlname_afterupdate()dim conn as new adodb.connectiondim rst as new adodb.recordsetdim strsql as stringset conn=currentproject.connectionstrsql="select 姓名from tablename where 姓名='"&me.controlname&"'"rst.open strsql,conn,adopenkeyset,adlockoptimisticif rst.recordcount=10 thenmsgbox"已经有10个这样的姓名了"end ifrst.closeset conn=nothingend sub