THis is working. Once I got it into a VBA module intelisense told me that there are three arguments for Switch. So the integer 4 is counting the array.
Code:
Private Sub Command0_Click()
'DoCmd.Hourglass True
' CurrentDb.Execute "DELETE * FROM VonageStmt;"
' lblVonageStmt.Visible = False
' txtVonageStmt = ""
Dim rs1 As DAO.Recordset
Dim FileName As String
Dim FileDate As Date
Dim FileNum As Integer
Dim strFilter As String
Dim strFileDesc As String
Dim strFileExt As String
Dim strRecord As String
Dim strRecordArray() As String
Dim intCount As Integer
Dim InputString
FileName = "C:\Test\SampleImport.csv"
' FileName = ahtCommonFileOpenSave( _
' InitialDir:="C:\Users\jhrAcer\Downloads\Vonage", _
' Filter:=strFilter, _
' OpenFile:=True, _
' DialogTitle:="Select File for Import... *.csv", _
' Flags:=ahtOFN_HIDEREADONLY)
' FileDate = FileDateTime(FileName)
' FileNum = FreeFile()
Set rs1 = CurrentDb.OpenRecordset("VonageStmt")
' DoCmd.RepaintObject acForm, "FrmMainMenu"
' DoCmd.Hourglass True
'Me.Command0.HyperlinkAddress = FileName
Dim intFile As Integer
intFile = FreeFile()
Dim strMyChange As String
' Open FileName For Input As #FileNum
Open FileName For Input As intFile
' On Error Resume Next
Do Until EOF(intFile)
Line Input #intFile, InputString
strRecordArray = Split(InputString, ",", 4)
If strRecordArray(1) <> "null" Then
rs1.AddNew
rs1.Fields("DtTm") = strRecordArray(0)
rs1.Fields("Type") = strRecordArray(1)
rs1.Fields("Number") = strRecordArray(2)
strMyChange = Left(strRecordArray(3), InStr(strRecordArray(3), ",") - 1)
rs1.Fields("Length") = strMyChange
RecCnt = RecCnt + 1
rs1.Update
End If
Loop
rs1.Close
Set rs1 = Nothing
Close #intFile
' DoCmd.Hourglass False
' lblVonageStmt.Visible = True
' txtVonageStmt = RecCnt
End Sub