Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Public Sub GetInterests()
Dim rs As Recordset
Dim strInterests As String
Dim strTemp As String
Dim astrInterests(14, 1) As String
Dim i As Integer
Set rs = New ADODB.Recordset
With rs
.Open "Table1", CurrentProject.Connection, adOpenKeyset, adLockOptimistic, adCmdTable
.MoveFirst
Do Until .EOF
strInterests = .Fields("Interests") & ","
Do Until strInterests = ""
strTemp = Left(strInterests, InStr(1, strInterests, ",") - 1)
strInterests = Mid(strInterests, InStr(1, strInterests, ",") + 2)
For i = 0 To 14
If IsNull(astrInterests(i, 0)) Or astrInterests(i, 0) = "" Then
astrInterests(i, 0) = strTemp
astrInterests(i, 1) = 1
Exit For
ElseIf astrInterests(i, 0) = strTemp Then
astrInterests(i, 1) = astrInterests(i, 1) + 1
Exit For
End If
Next i
Loop
.MoveNext
Loop
.Close
End With
For i = 0 To 14
Debug.Print astrInterests(i, 0) & " - " & astrInterests(i, 1)
Next i
End Sub