[AccessD] Find a Word & Put in New Field

paul.hartland at fsmail.net paul.hartland at fsmail.net
Wed Sep 24 08:08:54 CDT 2003


Virginia,
What you could do is something like the following :
Dim MyDocNo as String
MyDocNo = Mid(yourfieldname,Instr(yourfieldname,"DS-"),16)
Replace (yourfieldname,MyDocNo, "")
yourotherfield = MyDocNo
this should work, please remember to back up your table etc before trying it
Paul Hartland



Message date : Sep 24 2003, 02:02 PM 
>From : Hollis,Virginia 
To : 'Access Developers discussion and problem solving' 
Copy to : 
Subject : [AccessD] Find a Word & Put in New Field 
This is a real challenge... 

Is it possible to search a field for certain text, remove the word for 
placement in another field? 

We have a part description that lists the document number in the 
description. The document numbers are all the same length and all start with 
DS-, (ex: DS-MDD-15987-001). But the document number might be anywhere in 
the description. The document number needs to be separated out into a field 
by itself. 

There are over 3,000 records & I really don't want to sit here for days 
doing a copy & paste to move the number to a new field. 

Any ideas? Or can this be done at all? 

Virginia 
_______________________________________________ 
AccessD mailing list 
AccessD at databaseadvisors.com 
http://databaseadvisors.com/mailman/listinfo/accessd 
Website: http://www.databaseadvisors.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030924/bd21d3da/attachment-0001.html>


More information about the AccessD mailing list