易表在线答疑技术与交流用户社区 → [求助]If多了头就晕!


  共有5344人关注过本帖树形打印复制链接

主题:[求助]If多了头就晕!

帅哥哟,离线,有人找我吗?
wjq1072
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:16190 积分:125850 威望:1 精华:0 注册:2006/8/12 12:29:00
  发帖心情 Post By: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 ))

更改:试试?
If([确认]=-1,
Eval("If(IsBlank("""+Substitute(Substitute(ListCols(GridName),"|确认",""),"|",""")= True Or IsBlank(""")+""")= True ,MsgBox(""此行内容填写不齐全,请检查!"",0) And SetCellText(GridName,Row,""确认"",0), True )"),
If([确认]=-1 And FindRow("现有存货","商品名称","=",[商品名称])>0,SetCellText("现有存货",[现有存货!RelationRow],"数量",[现有存货!数量]+[数量]) And SetCellText("现有存货",[现有存货!RelationRow],"进金额",[现有存货!进金额]+[进金额]) And CopyRows("明细表","确认","=",-1) And DelFor(GridName,"确认","=",-1) And If(Text(Cell(1,1))="",SetCellText(GridName,1,1,Today()), True ) And MsgBox("已增加原商品数量!",0),If([确认]=-1 And FindRow("现有存货","商品名称","=",[商品名称])<=0,CopyRows("现有存货","确认","=",-1) And CopyRows("明细表","确认","=",-1) And DelFor(GridName,"确认","=",-1) And If(Text(Cell(1,1))="",SetCellText(GridName,1,1,Today()), True ) And MsgBox("新商品已入库!",0), True )))


 回到顶部
帅哥哟,离线,有人找我吗?
wjq1072
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:16190 积分:125850 威望:1 精华:0 注册:2006/8/12 12:29:00
  发帖心情 Post By:2010/3/15 18:41:00 [显示全部帖子]


 回到顶部