以文本方式查看主题 - 易表在线答疑 (http://egrid2000.com/dvbbs/index.asp) -- 用户社区 (http://egrid2000.com/dvbbs/list.asp?boardid=2) ---- [求助]If多了头就晕! (http://egrid2000.com/dvbbs/dispbbs.asp?boardid=2&id=19137) |
-- 作者:132 -- 发布时间:2010/3/12 10:03:00 -- [求助]If多了头就晕! 请帮忙看看下面的公式错在哪里? If([确认]=-1,Eval("if(IsBlank(""" + Substitute(ListCols(GridName),"|",""") = True Or IsBlank(""") + """) = True,MsgBox(""此行内容填写不齐全,请检查!"",1,3) And SetCellText(GridName,Row,"确认",0), True )"),If(FindRow("现有存货","商品名称","=",[商品名称])>0,SetCellText("现有存货",[现有存货!RelationRow],"数量",[现有存货!数量]+[数量]) And SetCellText("现有存货",[现有存货!RelationRow],"进价",[进价]) And CopyRows("明细表","确认","=",-1) And DelFor(GridName,"确认","=",-1) And If(Text(Cell(1,3))="",SetCellText(GridName,1,3,Today()), True ) And MsgBox("已增加原商品数量!",0),If([确认]=-1 And FindRow("现有存货","商品名称","=",[商品名称])<=0,CopyRows("现有存货","确认","=",-1) And CopyRows("明细表","确认","=",-1) And DelFor(GridName,"确认","=",-1) And If(Text(Cell(1,3))="",SetCellText(GridName,1,3,Today()), True ) And MsgBox("新商品已入库!",0), True )) 谢谢! |
-- 作者:wjq1072 -- 发布时间:2010/3/12 12:02:00 -- 原式: If([确认]=-1, Eval("if(IsBlank(""" + Substitute(ListCols(GridName),"|",""") = True Or IsBlank(""") + """) = True,MsgBox(""此行内容填写不齐全,请检查!"",1,3) And SetCellText(GridName,Row,"确认",0), True )"), If(FindRow("现有存货","商品名称","=",[商品名称])>0,SetCellText("现有存货",[现有存货!RelationRow],"数量",[现有存货!数量]+[数量]) And SetCellText("现有存货",[现有存货!RelationRow],"进价",[进价]) And CopyRows("明细表","确认","=",-1) And DelFor(GridName,"确认","=",-1) And If(Text(Cell(1,3))="",SetCellText(GridName,1,3,Today()), True ) And MsgBox("已增加原商品数量!",0),If([确认]=-1 And FindRow("现有存货","商品名称","=",[商品名称])<=0,CopyRows("现有存货","确认","=",-1) And CopyRows("明细表","确认","=",-1) And DelFor(GridName,"确认","=",-1) And If(Text(Cell(1,3))="",SetCellText(GridName,1,3,Today()), True ) And MsgBox("新商品已入库!",0), True )) 更改:试试? |
-- 作者:132 -- 发布时间:2010/3/12 15:16:00 -- 谢谢版主! 已经通过! |
-- 作者:132 -- 发布时间:2010/3/15 18:05:00 -- [这个贴子最后由132在 2010/03/15 06:22pm 第 1 次编辑] 版主您好!前面帮写的公式,运用时发现问题,现在我把文件传上来,请您费心看看,谢谢! egd文件下载 |
-- 作者:wjq1072 -- 发布时间:2010/3/15 18:41:00 -- egd文件下载 |
-- 作者:132 -- 发布时间:2010/3/16 7:55:00 -- 这下完全没有了问题.谢谢版主! |