I want to filter a subform based on two parameters on a form (combobox and textbox).
I have a Form with combobox cboTimePeriod which show data from table TimePeriod (exa
I guess TimePeriod is numeric, thus (and correction the spaces):
strWhere = strWhere & "[TimePeriodID] = " & Me!cboTimePeriod.Value & " AND "
and:
strWhere = strWhere & "[CityName] = '" & Trim(Me!txtSelectedCity.Value) & "' AND "
Edit: To look up another column, here the second column:
strWhere = strWhere & "[CityName] = '" & Trim(Me!txtSelectedCity.Column(1)) & "' AND "