Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A beggining function....
Message
From
03/04/2002 20:42:19
 
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00640655
Message ID:
00640676
Views:
16
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
>
Previous
Reply
Map
View

Click here to load this message in the networking platform