Finding specific text inside of a text field

G

gdwojo

This should be easy because the functionality of finding a specific word
within a text field already exists, but I need to do it for all records in
the database and then make a change in a field based on whether the text
exists in the field.

I have a pricing database where I have a discounting scheme that I apply. I
take the list price, apply a discount, and then determine if the price is a
minimum percentage above my cost. If the discount makes the price less than
the minimum profit, then I make the customer price the minimum profit,
otherwise I apply the discount that I have determined. However, on one
specific group of items, I apply a different discounting scheme. For every
one of these specific items (call them widgets) the word widget appears in a
long description field. For all widgets, if I want to change the
percentage of discount so I need to find all widgets and then replace the
discount percentage.

If all items are discounted at 20%, and I need widgets to discount at 30%
then I would like to change the value of my discount field for that record
from .20 to .30. Anybody have any ideas?

Is there any way to do this. - If not, how do I just put a record that I
can search on that tells me that the word widget shows up in the description
field??
 
J

John Vinson

This should be easy because the functionality of finding a specific word
within a text field already exists, but I need to do it for all records in
the database and then make a change in a field based on whether the text
exists in the field.

I have a pricing database where I have a discounting scheme that I apply. I
take the list price, apply a discount, and then determine if the price is a
minimum percentage above my cost. If the discount makes the price less than
the minimum profit, then I make the customer price the minimum profit,
otherwise I apply the discount that I have determined. However, on one
specific group of items, I apply a different discounting scheme. For every
one of these specific items (call them widgets) the word widget appears in a
long description field. For all widgets, if I want to change the
percentage of discount so I need to find all widgets and then replace the
discount percentage.

If all items are discounted at 20%, and I need widgets to discount at 30%
then I would like to change the value of my discount field for that record
from .20 to .30. Anybody have any ideas?

Is there any way to do this. - If not, how do I just put a record that I
can search on that tells me that the word widget shows up in the description
field??

Use a Query with a criterion on the long text field of

LIKE "*widget*"

or, if youhave several kinds of widgets,

LIKE "*" & [Enter type of widget] & "*"

Make it an Update query and update discount as you desire.

John W. Vinson[MVP]
 

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