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 / May 2005

Tip: Looking for answers? Try searching our database.

Replace chars

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve. - 11 May 2005 15:01 GMT
I am trying to replace chars in field without replacing all the chars.  I
have a field called in Member TBL called MbrName with a value of BFL####.  I
need to run a query that promps for a user number and have the #### replaced
with the user number entered.  I can only get the entire value replaced.  
help!
Chaim - 11 May 2005 16:06 GMT
Steve,

Is 'BFL' part of every MbrName value (interesting name for a field that is
clearly not a member name)? Why not simply catenate 'BFL' to the beginning of
the number in the update (presumably) SQL. Like:

          update MemberTBL set MbrName = "BFL" & Str([What's the number? ])
          where <whatever the criteria are to limit the update to this
single record>;

Or am I completely missing your problem here?

> I am trying to replace chars in field without replacing all the chars.  I
> have a field called in Member TBL called MbrName with a value of BFL####.  I
> need to run a query that promps for a user number and have the #### replaced
> with the user number entered.  I can only get the entire value replaced.  
> help!
Steve. - 11 May 2005 17:53 GMT
Sorry I wasnt so clear.  The  MbrName field will have many different members
that will have ####  in then name that will need to be replaced with the user
number entered. I have created a standard Table of members that will be
loaded to a second table after the update is applied.  It's basically a model
list that the user imports into prod table.

> Steve,
>
[quoted text clipped - 13 lines]
> > with the user number entered.  I can only get the entire value replaced.  
> > help!
Andre Laplume - 11 May 2005 16:23 GMT
This should work...

Create an Update Query and drop down MbrName.  Under the condition put:
LEFT([MbrName],3) = "BFL"

Under Update put: "BFL" & [Enter the new number]

It should change any member number staring with: BFL to BFL + the number
you enter.
 
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.