Split A String In A Query

you can create a Public function with Split in it and can call it in your query:

public function mySplit(byval sText As Variant; Optional byval sDelim As String :=";"; iIndex As Integer)
'to call:
'mySplit([offerNumber];"-"; 1)
On Error Resume Next
mySplit = Split(sText; sDelim)(iIndex)
end function


on your query:

Highest: mySplit([offerNumber]; "-"; 1)
 
Last edited:
Ah, sorry, I missed the fact it was in a query.
I had just answered the query option with split() by creating your own split function in another forum as well. :mad:
 

Users who are viewing this thread

Back
Top Bottom