Filtering Data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have a database that has fields such as: ID, Court Name, Address, City,
State, and Zip. I need to know if there's at least a court name such and
such appears at least once in the state of NJ. For example, I want to know
if there's at least 1 Drug Court in NJ.

How would I filter something like that? Is it possible?

Any suggestion?

Thanks,
bagia
 
The Filter string needs to look exactly like the WHERE clause of a query.

You can therefore mock up a query, type the desired critiera under the
fields, and then switch it to SQL View (View menu) to see what the WHERE
clause should look like. It should be something like this:
([Court Name] = "1 Drug Court") AND ([State] = "NJ")

If you are trying to generate this filter string, it needs to be encolosed
in quotes, and then the quotes inside it need to be doubled up, so you will
have:
"([Court Name] = ""1 Drug Court"") AND ([State] = ""NJ"")"
 
Thanks Allen...much appreciated.

Allen Browne said:
The Filter string needs to look exactly like the WHERE clause of a query.

You can therefore mock up a query, type the desired critiera under the
fields, and then switch it to SQL View (View menu) to see what the WHERE
clause should look like. It should be something like this:
([Court Name] = "1 Drug Court") AND ([State] = "NJ")

If you are trying to generate this filter string, it needs to be encolosed
in quotes, and then the quotes inside it need to be doubled up, so you will
have:
"([Court Name] = ""1 Drug Court"") AND ([State] = ""NJ"")"

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Bagia said:
I have a database that has fields such as: ID, Court Name, Address, City,
State, and Zip. I need to know if there's at least a court name such and
such appears at least once in the state of NJ. For example, I want to
know
if there's at least 1 Drug Court in NJ.

How would I filter something like that? Is it possible?

Any suggestion?

Thanks,
bagia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top