Combining Functions

N

Nick Anderson

I have a database where I would like to combine two functions for the same
field. Is there any easy way of doing this?
 
N

Nick Anderson

I have figured out how to combine functions but now I am having issues
getting the result that I am wanting.

Here is the function that I am using
Transfers: Replace([Transfer To],"1234","NA Transfers 1234") &
Replace([Transfer To],"2345","NB Transfers 2345") & Replace([Transfer
To],"5678","NC Transfers 5678")

When i execute this function this is what I get for the Transfers.
NA Transfers 123412341234
2345NB Transfers 23452345
56785678 NC Transfers5678

What I want it to look like is
NA Transfers 1234
NB Transfers 2345
NC Transfers 5678

Do you ahve any suggestions.
 
J

John Spencer

Nest the replace calls

Replace(Replace(Replace([Transfer To],"1234","NA Transfers
1234"),"2345","NBTransfers 2345"),"5678","NC Transfers 5678")



--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Nick Anderson said:
I have figured out how to combine functions but now I am having issues
getting the result that I am wanting.

Here is the function that I am using
Transfers: Replace([Transfer To],"1234","NA Transfers 1234") &
Replace([Transfer To],"2345","NB Transfers 2345") & Replace([Transfer
To],"5678","NC Transfers 5678")

When i execute this function this is what I get for the Transfers.
NA Transfers 123412341234
2345NB Transfers 23452345
56785678 NC Transfers5678

What I want it to look like is
NA Transfers 1234
NB Transfers 2345
NC Transfers 5678

Do you ahve any suggestions.




mscertified said:
Thats a bit vague. What are you trying to do?

-Dorian
 
K

KARL DEWEY

Nested Replace --
Try this ---
Transfers: Replace(Replace(Replace([Transfer To],"1234","NA Transfers 1234"),
"2345","NB Transfers 2345"), "5678","NC Transfers 5678")

--
KARL DEWEY
Build a little - Test a little


Nick Anderson said:
I have figured out how to combine functions but now I am having issues
getting the result that I am wanting.

Here is the function that I am using
Transfers: Replace([Transfer To],"1234","NA Transfers 1234") &
Replace([Transfer To],"2345","NB Transfers 2345") & Replace([Transfer
To],"5678","NC Transfers 5678")

When i execute this function this is what I get for the Transfers.
NA Transfers 123412341234
2345NB Transfers 23452345
56785678 NC Transfers5678

What I want it to look like is
NA Transfers 1234
NB Transfers 2345
NC Transfers 5678

Do you ahve any suggestions.




mscertified said:
Thats a bit vague. What are you trying to do?

-Dorian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top