--
Case "SuperaddDatas"
Dim mg As New Merger
\' MessageBox.Show()
mg.SourcePath = ProjectPath & "开票明细2023.xlsm"
mg.Format = "Excel2007" \'指定格式
mg.SourceTableName = "开票明细$" \'
mg.Fields = "发票号码,账单编号,发票种类,购方名称,开票日期,金额,税额,服务名称"
Dim fphm As WinForm.TextBox = e.Form.Controls("txt_FPHM")
\'如果文本框为空就按【账单编号】合并,反之就按【发票号码】合并
If fphm.Value = "" Then
mg.Filter = "账单编号 = \'" & Tables("tblEarning_Cash").Current("账单编号") & "\'"
Else
fphm.Value = Functions.Execute("FormatStrings", fphm.Value)
mg.Filter = "发票号码 In (" & fphm.Value & ")"
End If
mg.DataTableName = "tblInvoiceDetails_Cash" \'指定接收数据的表
mg.Merge() \'开始合并