此主题相关图片如下:3~p)5{6hor7~@g33hk}6.jpg
Dim rbck As WinForm.RadioButton = e.Form.Controls("仓库")
Dim rbcg As WinForm.RadioButton = e.Form.Controls("采购")
Dim rbsc As WinForm.RadioButton = e.Form.Controls("生产")
Dim rbgc As WinForm.RadioButton = e.Form.Controls("工程")
Dim rbzx As WinForm.RadioButton = e.Form.Controls("自选")
Dim cx As String
Dim ckc As WinForm.CheckedComboBox = e.Form.Controls("CheckedComboBox1")
If rbck.Checked = True Then
cx = "物料编码,物料名称,规格,用量,单重,总重,包装方式,单包数量,仓库,存仓位置,当前库存,变动日期"
ElseIf rbck.Checked = True Then
cx = "物料编码,物料名称,材质,规格,用量,采购提前期,最低采购量,最佳采购量,单价1,采购单位"
ElseIf rbgc.Checked =True Then
cx = "物料编码,物料名称,材质,规格,模具编号,模穴数,颜色,已生产,生产数量,重量500"
ElseIf rbgc.Checked = True Then
cx = "物料编码,物料名称,模具编号,模穴数,模具造型,模具钳工,模具尺寸,材质,规格,表面处理,图纸,设计变更,出模方式,模具情况"
ElseIf rbzx.Checked = True Then
If ckc.Value Is Nothing Then
cx = "*"
Else
cx = ckc.Value
End If
Else
If ckc.Value Is Nothing Then
cx = "*"
Else
cx = ckc.Value
End If
End If
DataTables("表A").Fill("Select " & cx & " From {物料清单} WHERE 物料编码 IN (SELECT 物料编码 FROM {产品})", "安琦乐", False)
查询内容为空时,正常,复选后就报错,是怎么回事?
[此贴子已经被作者于2012-2-10 22:58:13编辑过]