'逻辑型字段查询(性别)
if ComboSex.Text <> "" then '性别不等于空
if strSQLWhere <> "" then
strSQLWhere = strSQLWhere + " And " '用 And 连接前后两个条件
end if
if ComboSex.Text = "男" then '注意:性别男在数据表里对应数值的为1
strSQLWhere = strSQLWhere + "[性别]=1"
else '注意:性别男在数据表里对应数值的为0
strSQLWhere = strSQLWhere + "[性别]=0"
end if
end if
浙公网安备 33010602011771号