ms access - Need to format code for querying with exact value from combo box -
i have following ms access query. want query gender (female or male) selected combo box. @ moment, when select "female", query results includes male persons.
how should format code:
where (((q_gender_statistics.year) [cboyear] & "*") , ((q_gender_statistics.gender) "*" & [cbogender] & "*"))
don't use if not needed:
" q_gender_statistics.year = " & [cboyear] & " , q_gender_statistics.gender = '" & [cbogender] & "'"
if cbogender looks "male/female" form index value, try this:
" q_gender_statistics.year = " & [cboyear] & " , q_gender_statistics.gender = " & [cbogender] & ""
Comments
Post a Comment