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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -