Click here to Skip to main content
15,898,787 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am able to filter records using BindingSource.Filter = "FIELD like ENTRY".

So in this case only the records which match "ENTRY" in "FIELD" are displayed and the rest of the records are discarded.

I want to know what the simplest way is, to do the exact opposite.

I want the filter to discard the records which contain "ENTRY" in "FIELD" but display everything else.
So instead of using "FIELD like ENTRY" is there something similar to "FIELD unlike ENTRY" or "FIELD not like ENTRY"?

My Current Code:

TblAccomadationBindingSource1.Filter = "Site like '" & ComboBox5.Text & "*'"


Please Help


Marco
Posted

1 solution

Hi,
Sorry I kind of answered my own question there.

QryProblemLocationBindingSource.Filter = "[Location Field] not like '" & "Kitchen" & "*'"

I forgot brackets :rolleyes:
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900