7,763
社区成员
发帖
与我相关
我的任务
分享
strsql = ""
strsql = strsql & "select * " & vbcrlf
strsql = strsql & " from table1 " & vbcrlf
strsql = strsql & " where 1 =1 " & vbcrlf
If opton1.value=true then
strsql = strsql & " and [性别]='男' "
elseIf opton2.value=true then
strsql = strsql & " and [性别]='女' "
end if
if trim(combo1.text)<>"" and trim(combo2.text)<>"" then
strsql=strsql & " and " & trim(combo1.text) & " = '" & trim(combo2.text) & "' "
end if
strsql = ""
strsql = strsql & " select * " & vbcrlf
strsql = strsql & " from table1 " & vbcrlf
strsql = strsql & " where 1 =1 " & vbcrlf
If opton1.value=true then
strsql = strsql & " and [性别]='男' "
elseIf opton2.value=true then
strsql = strsql & " and [性别]='女' "
end if