MS Access Split Text into Multiple Columns - split function With the download access file
Описание
The download link access file: https://drive.google.com/file/d/1s1FQKBcO88gZaNe_-fD1ruhYpH54gq0O/view?usp=sharing
Separation of text words into columns by type separator between words
Through three parameters (text or field name, word number, separator type)
ms access split function
Access - Using Split() in a Query
download example
----------------------------------------------------------------------------------
Function GetColumn(strProductCode As String, strColumn As String, Separator As String) As String
Dim arCode 'variant will convert to array
Dim strReturn As String
strReturn = ""
On Error GoTo Sub_Exit
arCode = Split(strProductCode, Separator)
Select Case strColumn
Case "1"
strReturn = arCode(0)
Case "2"
strReturn = arCode(1)
Case "3"
strReturn = arCode(2)
Case "4"
strReturn = arCode(3)
Case "5"
strReturn = arCode(4)
Case "6"
strReturn = arCode(5)
Case "7"
strReturn = arCode(6)
Case "8"
strReturn = arCode(7)
Case "9"
strReturn = arCode(8)
Case "10"
strReturn = arCode(9)
'You can add more columns as follows
' Case "11"
'
' strReturn = arCode(10)
' Case "12"
'
' strReturn = arCode(11)
Case Else
strReturn = " "
End Select
Sub_Exit:
GetColumn = strReturn
End Function
' GetColumn([field name],"number of column","Separator")
' GetColumn([t],"1","-") return column no 1 from field name"t" Separator "-"
---------------------------------------------------------------------------------
Рекомендуемые видео



















