[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 263
  • Last Modified:

Remove trailing semi-colon from string

I am having a brain cramp and need some assistance!  Am using Access 2003, and am trying to remove a trailing ";" from a string array of values in a field,
I.E.  field value is E;T;P;
I need to remove the last ";".

Thanks in advance!

ptslv
0
ptslv
Asked:
ptslv
  • 4
  • 4
2 Solutions
 
Rey Obrero (Capricorn1)Commented:

fieldName=left([fieldname],len([fieldName]-1)
0
 
Patrick MatthewsCommented:
Checking to see if the last semicolon is there:

IIf(Right([SomeField], 1) = ";", Left([SomeField], Len([SomeField]) - 1), [SomeField])
0
 
ptslvAuthor Commented:
Thank you so much for the quick response!

ptslv
0
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
Patrick MatthewsCommented:
ptslv,

Are you positive that semicolon will *always* be there?

Regards,

Patrick
0
 
ptslvAuthor Commented:
No, it will not always be there.  I have to look for it.  I just couldn't remember the line to remove it!  I knew it invloved the string length, but couldn't get it set up properly.  Thanks again.

ptslv
0
 
Patrick MatthewsCommented:
ptslv said:
>>No, it will not always be there.  I have to look for it.  

Then you accepted the wrong answer.
0
 
ptslvAuthor Commented:
Patrick,
I'm sorry.  I did not see your response before submitting my acceptance.  It must have come in as I was typing.  I realize now that your response is the correct overall response, but I was looking specifically for the code that capricorn1 submitted in response to my question.  I already had the rest of the code.

ptslv
0
 
Patrick MatthewsCommented:
You can post a request in Community Support to have the question reopened.  Happens
frequently, actually.

BTW, I would have no objection to a split with cap1.
0
 
ptslvAuthor Commented:
OK, I will do that then.  Thanks.

ptslv
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now