dim strsql as string strsql="" if chk1.Value = 1 then strsql=strsq & "...." end if if chk1.Value = 2 then strsql=strsq & "...." end ifif chk1.Value = 2 then strsql=strsq & "...." end if剩下的你应该回了吧
dim strsql as string strsql="select * from table where true" 接着就用IF语名补充sql语句
strsql=""
if chk1.Value = 1 then
strsql=strsq & "...."
end if
if chk1.Value = 2 then
strsql=strsq & "...."
end ifif chk1.Value = 2 then
strsql=strsq & "...."
end if剩下的你应该回了吧
strsql="select * from table where true"
接着就用IF语名补充sql语句