Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A beggining function....
Message
De
03/04/2002 20:42:19
 
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00640655
Message ID:
00640676
Vues:
17
Thank you very much...

So if my update query in the macros is
UPDATE transaction SET particulars=changeover(particulars)
is will automatcally assign the value.... great!!!

Ric

>To return the value, simply assigned the value to the name of your function this way:
>
>
>
Public Function changeover(curname As String) As String
>Dim lcNewString, lcNewString1, lcNewString2
>
>lcNewString = curname
>
>Select Case lcNewString ' Evaluate New Name.
>
>    Case InStr(1, lcNewString, "0", 1) > 1
>        ' We will leave this one alone....
>    Case InStr(1, lcNewString, " ", 1) < 1
>        ' This string looks to be all characters... so leave it alone....
>    Case InStr(1, lcNewString, " ", 1) > 1
>        ' Okay, if we have more than two spaces, we are in a bit of strife...
>        lcNewString = "***" + lcNewString
>    Case InStr(1, lcNewString, " ", 1) = 1
>        ' Okay, now we have one space.... so, what do we have as far as
>        ' length of the two strings....
>        lcString1 = Mid$(1, lcNewString, InStr(1, lcNewString, " ", 1))
>        lcString2 = Mid$(1, lcNewString, Len(lcNewString) - InStr(1, lcNewString, " ", 1))
>        ' now, change the positions....
>        lcNewString = ALLTRIM(lcString2) + ALLTRIM(lcString1)
>End Select
>
>changeover = lcNewString
>End Function
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform