|
dim strwh as string
dim x0 as single
dim x1 as single
dim x2 as single
strwh="货号='" & me.货号.value & "'"
strwh=strwh & " and 名称='" & me.名称.value & "'"
x0=Dlookup("准终","工序单价",strwh & " and 工序='" & me.上工序.value & "'")
x1=Dlookup("单价","工序单价",strwh & " and 工序='" & me.上工序.value & "'")
x2=Dlookup("分值","工序单价",strwh & " and 工序='" & me.上工序.value & "'")
x0=x0+Dlookup("准终","工序单价",strwh & " and 工序='" & me.下工序.value & "'")
x1=x1+Dlookup("单价","工序单价",strwh & " and 工序='" & me.下工序.value & "'")
x2=x2+Dlookup("分值","工序单价",strwh & " and 工序='" & me.下工序.value & "'")
me.准终.value=x0
me.单价.value=x1
me.分值.value=x2 |
|