Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 11th, 2010, 02:58 PM
Registered User
 
Join Date: Aug 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default I need to search for a word in a sentence.

I need to find a word in a sentence. I need to find the exact word in a sentence. Here is the example.

I need to find "Red" in the sentence below.

"I have a Red car." If "Red is found, I can update a field. I know how to use the instr function, but it is not working for what i need.

What I am doing is searching a description field for a color, if the color is found in that field, I update another field in that record.

Any help would be great. Thanks.
 
Old August 11th, 2010, 03:27 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

can you show us the code you are using?? instr should be working ok. Maybe you have another problem?? (like CAPS??)
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
 
Old August 11th, 2010, 03:38 PM
Registered User
 
Join Date: Aug 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I haven't done the code yet, because I haven't figure out the best way to do it. Here is what I am trying to accomplish.

I have a master color file. The file has two fields in it. ColorName and SLName. The purpose of this file is to use the ColorName and search another file field to find the ColorName. If the ColorName is found in the field, I update a field in that file with SLName. This is EDI related. The customer enters information in a field like "SOFA 2-SIDE RED".
 
Old August 11th, 2010, 03:58 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

but your original post reads: "I know how to use the instr function, but it is not working for what i need"

So, did you even try it?? or you need the full code??
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
 
Old August 11th, 2010, 04:06 PM
Registered User
 
Join Date: Aug 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I need a good code example of how to do this. I am programmer, but I am new to the Access 2007 VBA code. Any help would be great. Thanks





Similar Threads
Thread Thread Starter Forum Replies Last Post
search a text and return the sentence sankar2chat SQL Server 2000 9 July 17th, 2008 02:27 PM
Search certain word using XML deean XML 16 June 12th, 2008 05:57 AM
Word search - Count Hits bonekrusher XSLT 5 January 2nd, 2008 10:26 AM
a bold word in a selected sentence Birger XSLT 4 January 1st, 2007 07:02 PM
How to highlight search results in Word haiying Access VBA 0 July 25th, 2005 11:13 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.