paul.hartland at fsmail.net
paul.hartland at fsmail.net
Wed Sep 24 10:56:55 CDT 2003
sorry try this line yourfieldname = Replace (yourfieldname,MyDocNo, "") Paul Message date : Sep 24 2003, 04:52 PM >From : Hollis,Virginia To : 'Access Developers discussion and problem solving' Copy to : Subject : RE: [AccessD] Find a Word & Put in New Field Do I put it in a module & run it? class=100264215-24092003> I get the error: Expected = on Replace (.... class=100264215-24092003> class=100264215-24092003>Va. class=100264215-24092003> size=2>-----Original Message----- From: paul.hartland at fsmail.net [mailto:paul.hartland at fsmail.net] Sent: Wednesday, September 24, 2003 8:09 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Find a Word & Put in New Field 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 style="BORDER-LEFT: #ff0000 2px solid; MARGIN-LEFT: 5px; PADDING-LEFT: 5px">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 [ (no filename) (0.2 Kb) ] -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030924/71bfcf6b/attachment-0001.html>