473,503 Members | 7,214 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Comparisons

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
4 1183
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

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

Apr 20 '06 #3
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
1570
by: A.M. Kuchling | last post by:
python.org has a page of "Python vs. X" language comparisons at <http://www.python.org/doc/Comparisons.html>. They're all pretty outdated, and often unfair because they're written by a person who...
0
1174
by: Mike Rovner | last post by:
Mike Rovner wrote: > A.M. Kuchling wrote: >> python.org has a page of "Python vs. X" language comparisons at >> <http://www.python.org/doc/Comparisons.html>. They're all pretty >> outdated, and...
11
1500
by: Dietrich Epp | last post by:
Without invoking double-underscore black magic, it is possible to choose a, b, and c in Python such that: a < b b < c c < a This could cause sorting functions to malfunction. >>> class...
5
3394
by: Pratyush | last post by:
Hi, Suppose there is a vector of objects of class A, i.e., std::vector<A> vec_A(N); The class A satisifies all the STL vector requirements. Now I wish to add some attributes for each of the...
3
4594
by: Kevin King | last post by:
I have a question about an assignment I have. I need to count the number of comparisons in my merge sort. I know that the function is roughly nlog(n), but I am definately coming up with too many...
10
1542
by: Peter Ammon | last post by:
I'm fuzzy on exactly what I can depend on when doing floating point comparisons. I know that calculated values can differ, e.g. I'm not guaranteed that 1. + 2. == 3. What about comparisons with...
4
1525
by: Aamir Mahmood | last post by:
Hi I am on framework version 1.1 (SP1). Consider the following code. public static void Main() { int i=1; int j=1;
7
1386
by: Jim Michaels | last post by:
This is a simple coding tip I learned to prevent comparisons from becoming assignments (and this becoming a hair-pulling session during debugging): in comparisons, try to put your constants on...
1
1805
by: Quimbly | last post by:
I'm having some problems comparing delegates. In all sample projects I create, I can't get the problem to occur, but there is definitely a problem with my production code. I can't give all the...
2
1646
by: Nishad | last post by:
Is anybody know how to write xpath for string Value Comparisons thank you
0
7291
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7357
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7012
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5598
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3180
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3171
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1522
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
402
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.