Foxtable(狐表)用户栏目专家坐堂 → 代码的循环执行


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

主题:代码的循环执行

帅哥,在线噢!
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:109735 积分:558391 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2022/10/19 10:17:00 [显示全部帖子]

参考:http://www.foxtable.com/webhelp/topics/0225.htm
比如循环5次
Dim cmb1 As winform.combobox = e.Form.controls("cmbprinters")
Dim i As Integer
For 
i = 1 to 5
Dim doc1 As PrintDoc = e.Form.GernatePrintDoc()
If cmb1.value <> "默认打印机" Then
    Doc1.printername = cmb1.value
End If
doc1.Print()
Next

Tables("零件目录表").current("选择") = False
Tables("零件目录表").current("打印") = True
Forms("打印工艺卡").Close()


 回到顶部
帅哥,在线噢!
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:109735 积分:558391 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2022/10/19 10:58:00 [显示全部帖子]

Dim cmb1 As winform.combobox = e.Form.controls("cmbprinters")
Tables("零件目录表").filter = "选择=true"
For each r as row in Tables("零件目录表").rows
Tables("零件目录表").position = r.index
Dim doc1 As PrintDoc = e.Form.GernatePrintDoc()
If cmb1.value <> "默认打印机" Then
    Doc1.printername = cmb1.value
End If
doc1.Print()
r("选择") = False
r("打印") = True
Next

Forms("打印工艺卡").Close()


 回到顶部