以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]关于两个筛选条件的写法问题 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=56696) |
-- 作者:peterx -- 发布时间:2014/9/10 21:10:00 -- [求助]关于两个筛选条件的写法问题 下面这段代码是想,根据满足“年度”和“PI"两个字段的条件时,取PI序的最大值,但运行时出错。请老师指教下代码是不是有问题? Dim ndb As String = e.Form.Controls("年度").text Dim pib As String = e.Form.Controls("PI") .text Dim fxh As String Dim xfxh As String fxh = Tables("购置申请管理").Compute("max(购置申请编号分解_PI序)", "购置申请编号分解_年度 = \'" & ndb & "\'" And "购置申请编号分解_PI代码 = \'" & pidm & "\'") xfxh = Format(fxh+1, "00") MessageBox.show(xfxh) [此贴子已经被作者于2014-9-10 21:11:24编辑过]
|
-- 作者:有点甜 -- 发布时间:2014/9/10 21:12:00 -- fxh = Tables("购置申请管理").Compute("max(购置申请编号分解_PI序)", "购置申请编号分解_年度 = \'" & ndb & "\' And 购置申请编号分解_PI代码 = \'" & pidm & "\'") |
-- 作者:peterx -- 发布时间:2014/9/10 22:16:00 -- 谢谢 |