不行,只能这样。
Dim Comobo As String="电汇|支piao|现金|其他"
Dim ComoboBank As String="交行|工行|农行|中行|建行|商行|浦发|兴业|光大|信用社"
Dim StartTime As Date=CurrentTable.Current("发货日期")
Dim EndTime As String="2015-01-01"
Dim ComboDate As String
Dim TblName As String
TblName=CurrentTable.Name
Forms("测试数据窗口").Open()
Dim dr As DataRow
Dim dtb As New DataTableBuilder("临时付款录入表") '创建临时表
dtb.AddDef("姓名", Gettype(String),30)
dtb.AddDef("性别", Gettype(String))
dtb.AddDef("货物名称", Gettype(String),30)
dtb.AddDef("发货日期", Gettype(String))
dtb.AddDef("发货日期2", Gettype(Date),"发货日期")
dtb.AddDef("发往地", Gettype(String))
dtb.AddDef("付款类型", Gettype(String))
dtb.AddDef("付款银行", Gettype(String),30)
dtb.Build()
Tables("测试数据窗口_Table1").DataTable.DataRows.Clear()
Tables("临时付款录入表").Visible=False
Tables("测试数据窗口_Table1").DataSource=DataTables("临时付款录入表")'临时表绑定到窗口
Tables("测试数据窗口_Table1").DataTable.GlobalHandler.PrepareEdit=True
Tables("测试数据窗口_Table1").Cols("付款类型").ComboList=Comobo
Tables("测试数据窗口_Table1").Cols("付款银行").ComboList=ComoboBank
Dim drNew As DataRow = DataTables("临时付款录入表").AddNew '给临时表添加数据
drNew("姓名")=Tables(TblName).Current("姓名")
drNew("性别")=Tables(TblName).Current("性别")
drNew("货物名称")=Tables(TblName).Current("货物名称")
drNew("发货日期")=cstr(Tables(TblName).Current("发货日期"))
drNew("发往地")=Tables(TblName).Current("发往地")
drNew("付款银行")=Tables(TblName).Current("付款银行")
drNew("付款类型")=Tables(TblName).Current("付款类型")
drNew("付款银行")="交行"
drNew("付款类型")="电汇"
Tables("测试数据窗口_Table1").Cols("发货日期").ComboList="2015-02-03|2015-02-04"