Please Help.

J

JP

Hi All,

I have an "Itinerary" Field in my table, Data type "Text"
and with field Size 254. It contain Values like

"Melbourne, Sydney, Brisbane, Auckland, Napier, Port
Chalmers, Panama Canal, Manzanillo, Savannah,
Philadelphia, Zeebrugge, Tilbury"

I want to display first 3 letter of first word and first 3
letter of the last word. i.e for the above Itinerary I
want to display as "Mel/Til" on my report. How do I do
this. Please Advise.

Thanks,
JP
 
R

Rick Brandt

JP said:
Hi All,

I have an "Itinerary" Field in my table, Data type "Text"
and with field Size 254. It contain Values like

"Melbourne, Sydney, Brisbane, Auckland, Napier, Port
Chalmers, Panama Canal, Manzanillo, Savannah,
Philadelphia, Zeebrugge, Tilbury"

I want to display first 3 letter of first word and first 3
letter of the last word. i.e for the above Itinerary I
want to display as "Mel/Til" on my report. How do I do
this. Please Advise.

The first part is dead-easy. Left([Itinerary], 3) & "/"

The latter will likely require a custom function to find the last occurrence of a
comma and then grab characters from there.

What would solve the problem better is if your data were properly normalized. You
should have a separate Itinerary *table* that is linked to your current one. Then
"Melbourne", "Sydney", etc., each are separate rows in the new table. With that
setup what you're trying to do becomes much easier.
 

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