If e.DataTableName = "监造统计" AndAlso e.User.Name = "张三" Then e.SelectString = "Select * From {监造统计} Where [工程项目/用户] = '炼油改造项目'" End If If e.DataTableName = "合同明细表" AndAlso e.User.Name = "张三" Then e.SelectString = "Select * From {合同明细表} Where [项目名称] ='炼油改造项目'" End If