Delete certain text from field

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

Guest

I was wondering if it is possible to delete certain text from a field. Here
is an example..
I have a brand name field and want to take that brand name out of a
description field but leave everything else...
[vendor]=SutterHome
[Description]=SutterHome Merlot
[result of query]=Merlot

I hope I was able to explain myself. If not please let me now.

Thanks,
Lisa
 
1. Make a backup of the database in case something goes wrong.

2. Create a query into this table.

3. Change it to an Update query (Update on Query menu).
Access adds an Update row to the grid.

4. Drag the Description field into the grid.
In the Update row under this field, enter:
Trim(Replace([Description], [vendor], ""))

5. Run the query.

If you run into trouble with the Replace() function, post back. (Access 97
does not have it, and Access 2000 may have a problem figuring out how to use
it in the context of a query.)
 
Thanks for your help. It worked great!!!

Have a great day!!



Allen Browne said:
1. Make a backup of the database in case something goes wrong.

2. Create a query into this table.

3. Change it to an Update query (Update on Query menu).
Access adds an Update row to the grid.

4. Drag the Description field into the grid.
In the Update row under this field, enter:
Trim(Replace([Description], [vendor], ""))

5. Run the query.

If you run into trouble with the Replace() function, post back. (Access 97
does not have it, and Access 2000 may have a problem figuring out how to use
it in the context of a query.)

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

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

Barce5 said:
I was wondering if it is possible to delete certain text from a field.
Here
is an example..
I have a brand name field and want to take that brand name out of a
description field but leave everything else...
[vendor]=SutterHome
[Description]=SutterHome Merlot
[result of query]=Merlot

I hope I was able to explain myself. If not please let me now.

Thanks,
Lisa
 
Back
Top