'逻辑型字段查询(性别)

 

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

posted @ 2005-11-05 17:14  致远钓客  阅读(300)  评论(0)    收藏  举报