老师,如图我有一个表控件使用SQL代码生产的,我现在想要在单据编号,供应商的下拉框能过滤出表中的数据。列如供应商选中a 过滤出来都是供应商A的数据 请问这个怎么写,SQL小白一枚 刚刚学习中
表控件SQL为:
Dim cmd As New SQLCommand
Dim dt As DataTable
cmd.C
cmd.CommandText = "SE LEC T fbillno as 单据编号,{t_Supplier}.Fname as 供应商 ,{POOrder}.fdate as 日期 ,{t_Department}.FName as 部门,{t_ICItem}.fname as 物料名称,{t_ICItem}.FModel as 规格型号,{t_MeasureUnit}.fname as 单位 ,{t_Currency}.Fname as 币别,{POOrderEntry}.FQty as 数量,{t_emp}.FName as 业务员, b.fname as 制单人 ,{t_user}.fname as 审核人, {POOrder}.FCheckDate as 审核时间 From (((((((({POOrder} left join {t_Supplier} on {POOrder}.FSupplyID = {t_Supplier}.FItemID) left join {t_Department} on {POOrder}.FDeptID = {t_Department}.FItemID) inner join {POOrderEntry} on {POOrder}.FInterID = {POOrderEntry}.FInterID) inner join {t_ICItem} on {POOrderEntry}.FItemID = {t_ICItem}.FItemID) inner join {t_MeasureUnit} on {t_ICItem}.FUnitID = {t_MeasureUnit}.FMeasureUnitID) inner join {t_emp} on {POOrder}.FEmpID = {t_emp}.fitemid) inner join {t_Currency} on {POOrder}.FCurrencyID = {t_Currency}.FCurrencyID) left join {t_User} on {POOrder}.fcheckerid = {t_User}.FUserID) left join {t_User} b on {POOrder} .FBillerID = b .FUserID "
dt = cmd.ExecuteReader()
Tables("窗口1_Table1").DataSource = dt
Tables("窗口1_Table1").DataTable.DataCols("数量").Decimals = 1
Tables("窗口1_Table1").DataTable.DataCols("数量").SetFormat("0.0")
Tables("窗口1_Table1").AutoSizeCols() '自动列宽
此主题相关图片如下:企业微信截图_20191111130512.png