原式:
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 )))