Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / August 2006

Tip: Looking for answers? Try searching our database.

Searching a string for to find a matching substring

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JoeA2006 - 03 Aug 2006 22:51 GMT
I am working with a field that contains a Description and 3 character code.
Normally the field contains  a space between the description and the code.
Sometimes there are variations, but they are limited to the following

xxxxxxxx xxx (normal)
xxxxxxx xxx-x
xxxxxx -  xxx
xxxxxxxx-xxx
I need to grab the 3 character code and bounce it of another table to
classisfy the record. Is there anyway to search the string for consecutive
characters that match the field in the other table that contains the data
related it the code. No matter how I try to manipulate the string I have not
found the answer..Obviously the answer is to have these descriptions uniform,
but until that happens, I hoped to work around it.
Michel Walsh - 03 Aug 2006 23:20 GMT
Hi,

You can use Replace to remove the spaces and the -:

UniformizedCode:  Replace( Replace( myField, " ", ""), "-", "")

Hoping it may help,
Vanderghast, Access MVP

>I am working with a field that contains a Description and 3 character code.
> Normally the field contains  a space between the description and the code.
[quoted text clipped - 12 lines]
> uniform,
> but until that happens, I hoped to work around it.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.