By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,475 Members | 1,372 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,475 IT Pros & Developers. It's quick & easy.

Comparisons

P: n/a
JA
Hi,

Can someone tell me if this is possible? I have 2 fields in an Access 2000
db - one is the product name, the other is the product description. If the
product name is contained in the product description, I put bold tags around
it (<b> </b>). Would it be possible to do that with a query or some kind of
expression or something else? So that it could be done automatically. I have
to go through several 100 or 1000 new products per month!

Thanx!
Apr 20 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
JA wrote:
Hi,

Can someone tell me if this is possible? I have 2 fields in an Access
2000 db - one is the product name, the other is the product
description. If the product name is contained in the product
description, I put bold tags around it (<b> </b>). Would it be
possible to do that with a query or some kind of expression or
something else? So that it could be done automatically. I have to go
through several 100 or 1000 new products per month!
Thanx!

Quick attempt tested on three entries with the ProductName appearing at the
beginning, middle, and end of the ProductDescription. The WHERE clause it just
to filter out rows where this has already been done before.

UPDATE Products
SET Products.ProductDescription =
Mid([ProductDescription],1,InStr(1,[ProductDescription],[ProductName])-1) &
"<b>" &
Mid([ProductDescription],InStr(1,[ProductDescription],[ProductName]),Len([ProductName]))
& "</b>" &
Mid([ProductDescription],InStr(1,[ProductDescription],[ProductName])+Len([ProductName]))
WHERE (((Products.ProductDescription) Not Like "*<b>*"));

(Please try first on a test copy of your table)

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Apr 20 '06 #2

P: n/a

Update Product Set ProductDesc = "<br>" & ProductDesc & "</br>" where
ProductID in (SELECT ProductID FROM Student where ProductID =
ProductDesc)

Apr 20 '06 #3

P: n/a
Check out the Instr function in the Help file. It will do what you want.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
Over 1175 users have come to me from the newsgroups requesting help
re******@pcdatasheet.com
"JA" <ja*****@kc.rr.com> wrote in message
news:pA***************@tornado.rdc-kc.rr.com...
Hi,

Can someone tell me if this is possible? I have 2 fields in an Access 2000
db - one is the product name, the other is the product description. If the
product name is contained in the product description, I put bold tags
around it (<b> </b>). Would it be possible to do that with a query or some
kind of expression or something else? So that it could be done
automatically. I have to go through several 100 or 1000 new products per
month!

Thanx!

Apr 20 '06 #4

P: n/a
"PC Datasheet" <fa***@email.com> wrote in message
news:nd*****************@newsread2.news.atl.earthl ink.net...
Check out the Instr function in the Help file. It will do what you want.


No. No it won't.

To anyone reading this thread:

It is commonly accepted that these newsgroups are for free
exchange of information. Please be aware that PC Datasheet
is a notorious job hunter. If you are considering doing
business with him then I suggest that you take a look at
the link below first.

http://home.tiscali.nl/arracom/whoissteve.html
Apr 20 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.