Query - Counting specific text in a field

G

Guest

I have a query which sums data in a table and i want one of the fields to
count the amount of times the word "removed" is in the field.
My query counts the number of records (ie. 50), the total sales for that day
over the 50 records (lets say $1,000) and for some of the 50 record i have
put the word removed (lets say twice).
So i want the query to return
50 records & $1,000 in sales and two removed

Help me

Daniel
 
D

Duane Hookom

Are you sure you want "two" and not "2"? You can get the count with an
expression like:
=Abs(Sum(Instr([The unnamed field], "removed")>0))
 
G

Guest

thanks
worked perfectly
Daniel

Duane Hookom said:
Are you sure you want "two" and not "2"? You can get the count with an
expression like:
=Abs(Sum(Instr([The unnamed field], "removed")>0))

--
Duane Hookom
MS Access MVP


Daniel said:
I have a query which sums data in a table and i want one of the fields to
count the amount of times the word "removed" is in the field.
My query counts the number of records (ie. 50), the total sales for that
day
over the 50 records (lets say $1,000) and for some of the 50 record i have
put the word removed (lets say twice).
So i want the query to return
50 records & $1,000 in sales and two removed

Help me

Daniel
 

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

Top