title: No value given for one of more required parameters
body: <p>I am not a programmer so the below code was not created by me. I was trying to replicate one of the functions for a new account and i've been running into an error at this line:</p>
  
  <pre><code>rs.Open "Select * From " &amp; file2 &amp; ".txt order by [Security]", _
         conn, adOpenStatic, adLockUnspecified, adCmdText
  </code></pre>
  
  <p>The file that it's referencing is similar to the other files so i am unsure on what the problem could be. I checked all the spelling and i just can't figure it out. Some help or just even how to troubleshoot would be much appreciated.</p>
  
  <pre><code>Public Sub RunRecon()
      Application.Calculation = xlManual
      ReconLDSF
      ReconUCAL
      ReconCNSL
      ReconMONT
      ReconMAC50
      ReconMAC40
      ReconTOU
      ReconVER
      Application.Calculation = xlAutomatic
      End Sub
      Function ReconTOU()
      Dim conn As New ADODB.Connection
      Dim rs As New ADODB.Recordset
      Dim adcomm As New ADODB.Command
      Dim path As String
      Dim loDataWrk As Worksheet
      Set loDataWrk = Worksheets("TOU")
  
      loDataWrk.Range("A3:AZ5000").ClearContents
      path = "L:\ForumAxys\ForumImports\Mellon\Versus\"
      conn.Open "Provider=Microsoft.ACE" _
  
  
   &amp; ".OLEDB.12.0;Data Source=" &amp; path _
      &amp; ";Extended Properties='text;HDR=Yes;" _
      &amp; "FMT=Delimited'"
  
  rs.Open "Select * from [Custody Holdings.csv] where [Account Number] = '492617' and [Traded Shares/Par] &lt;&gt; '0' order by [Security Description 1]", _
       conn, adOpenStatic, adLockReadOnly, adCmdText
  
  cnt = 3
  Name = "NA"
  
  Do While Not rs.EOF
  If Left(rs.Fields("Security Description 1"), 8) = "THE LINK" Then
      Name = Replace(rs.Fields("Security Description"), "THE ", "")
  Else
      Name = rs.Fields("Security Description 1")
      End If
  
  loDataWrk.Cells(cnt, 1) = Name
  loDataWrk.Cells(cnt, 2) = CLng(rs.Fields("Settled Shares/Par"))
  
  cnt = cnt + 1
  rs.MoveNext
  Loop
  
  
  
  Range("A3:B" &amp; cnt - 1).Sort Key1:=Range("A3"), Order1:=xlAscending, Header:=xlGuess, _
  OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
  DataOption1:=xlSortNormal
  conn.Close
  
  path = "L:\Axys38\txt\"
  file2 = "tou"
  conn.Open "Provider=Microsoft.ACE" _
          &amp; ".OLEDB.12.0;Data Source=" &amp; path _
          &amp; ";Extended Properties='text;HDR=Yes;" _
          &amp; "FMT=TabDelimited'"
  **rs.Open "Select * From " &amp; file2 &amp; ".txt order by [Security]", _
         conn, adOpenStatic, adLockUnspecified, adCmdText**
  
  
  cnt = 3
  Do While Not rs.EOF
  loDataWrk.Cells(cnt, 3) = rs.Fields("Security")
  loDataWrk.Cells(cnt, 4) = rs.Fields("Quantity")
  loDataWrk.Cells(cnt, 5) = "=B" &amp; cnt &amp; "-D" &amp; cnt
  cnt = cnt + 1
  rs.MoveNext
  Loop
  
  conn.Close
  End Function
  </code></pre>
  
  <p>Below are two .txt files. The second one works (w/o changing any coding just referencing to it) and the first one doesn't. They're being split out by the same script. They seem to have the same formatting and the same headers... I dont't understand what i could possibly change.</p>
  
  <pre><code>Security Symbol Security    Quantity    Local ISO   Price   Spot Rate   Total Cost  Unrealized Gain/Loss    Market Value
  AAAA    AAAAA   10000   SGD 1.23    1.2762  13089.5278  -748.20 12341.3258
  BBBB    BBBBB   494 USD 23.45   1.0000  13011.6900  -1427.39    11584.3000
  
  
  
  Security Symbol Security    Quantity    Local ISO   Price   Spot Rate   Total Cost  Unrealized Gain/Loss    Market Value
  AAA AAAAA   18200   JPY 21.90   97.9000 486611.8961 -88033.76   398578.1410
  </code></pre>