<>代码查找法</P>
<>if not isnull(dlookup("[编号]","表名","[单价号]='" & Me.单价号 & "'" & " and [编号]='" & Me.编号 & "'")) then '查找是否有重复的号</P>
<>或者</P>
<P>if not isnull(dlookup("[编号]","表名","[单价号]&[编号]='" & Me.单价号 & Me.编号 & "'")) then '查找是否有重复的号</P>