Re: Wondering first caracter for each word in the field

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Ladi (lavdibakiu_at_hotmail.com)
Date: 03/18/05


Date: Fri, 18 Mar 2005 08:43:42 +0100

Sorry Rn for the delay,

What if we need to exclude some word from showing thir first letter through
Initialise function.
Example: From "Ministry of Foreign Affairs" to retreive "MFA" excluding word
"of"?

Thanks,
Ladi

"Ron Weiner" <weinNoSpam1@mindspring.com> wrote in message
news:Onmc$caKFHA.4032@TK2MSFTNGP14.phx.gbl...
> Ladi
>
> I couldn't resist. Here is a function that you can put in a global module
> that can get called from anywhere in your app that will return the first
> initial of every word passed to it.
>
> So for instance: Initialize("Minister of Foreign Offices")
>
> would return MOFO
>
> How about: Initialize("Secretary of Baloney")
> or Initialize("First Undersecretary Concerning Kitchen Ergonomics
> Reorganization")
>
> Just boggles the mind!!
>
> Here is the code.
>
> Public Function Initialize(strIn As String) As String
> Dim strInitals As String, intPos As Integer
>
> strInitals = Left(strIn, 1)
> intPos = InStr(1, strIn, " ")
> Do While intPos > 0
> strInitals = strInitals & Mid(strIn, intPos + 1, 1)
> intPos = InStr(intPos + 1, strIn, " ")
> Loop
> Initialize = Replace(UCase(strInitals), " ", "")
> End Function
>
> Ron W
>
> "Ladi" <lavdibakiu@hotmail.com> wrote in message
> news:u5x4rFaKFHA.604@TK2MSFTNGP10.phx.gbl...
>> Hi all,
>>
>> Is there anyway to retrieve the first character for each word from the
> field
>> formatted as text?
>> Example:
>> On the field there is "Ministry of Foreign Affairs" and we retrieve
> "MOFA".
>>
>> Thanks in advance,
>> Ladi
>>
>>
>
>



Relevant Pages

  • Re: Tying check boxes to data
    ... Specifically I want to exclude the column of data that the check box ... Start out by writing a function that builds the string ... When I check one of the check boxes I ... For the first one it will either blank out the entire graph or allow the ...
    (microsoft.public.access.modulesdaovba)
  • Re: A string & a list
    ... You should exclude those elements from the string: ... The array @- is an internal one, storing the offsets of the substrings found by the last regex pattern match. ... The push of the results of the recursive call is qualified by a call to grepto make sure the new value isn't already in the list. ...
    (perl.beginners)
  • Re: Integers behaving like strings
    ... Date/Time data type in the table OR it's a text field that looks like a date? ... so I need to exclude records that might have been ... month field, [cbxMonth], is a combo box with column 1 being MonthID as ... an integer and column 2 being the month name as a string. ...
    (microsoft.public.access.queries)
  • Re: Wondering first caracter for each word in the field
    ... > What if we need to exclude some word from showing thir first letter ... >> Public Function Initialize(strIn As String) As String ... >> Ron W ...
    (microsoft.public.access.formscoding)
  • Re: An already compressed file encoding question
    ... >(Computations courtesy of the Emacs calculator.) ... >> If we call the taken data block, the input group. ... >> possible to exclude certain impossible combinations from the input ... Let's take a sample string with length L from a file with a near ...
    (sci.crypt)