If DataTables("业务表").DataRows.Count = 0 Then '如果订单表没有数据 DataTables("费用表").LoadFilter = "业务编号 Is Null" '不加载订单明细 Else Dim ids As String For Each dr As DataRow In DataTables("业务表").DataRows ids = ids & ",'" & dr("业务编号") & "'" Next ids= ids.Trim(",") DataTables("费用表").LoadFilter = "业务编号 In (" & ids & ")" End If