What is wrong with this rowfilter statement?

  • Thread starter Thread starter Mark Sandfox
  • Start date Start date
M

Mark Sandfox

dvPOIs.RowFilter = "(County='" & ddlCountyRegion.SelectedItem.Text & "' OR
Region='" & ddlCountyRegion.SelectedItem.Text & "')"

The objective is to allow the user to chose from one dropdownlist either a
county or region, then use rowfilter to display only the rows that have
either the county or region that was selected.

The current (above) string returns am empty list.

Thanks in advance for your help.
 
Are you getting a runtime error or a logical error? Also, I am not sure if
your criteria should be within ( ). I usually use " " and then ' ' to
specify a value

E.g

dvPOIs.RowFilter = "Country = ' " & ddlCountryRegion.SelectedItem.Text & "
' Or ...
 
Back
Top