Hello Everyone,
I have the following code:
I have the following code:
Code:
Sub get_applications()
Dim conn As New Connection
Dim rec As New Recordset
Dim comm As New Command
Dim ws As Worksheet
Dim Month$
Set ws = ThisWorkbook.Worksheets("command")
conn.Open "Provider=microsoft.jet.oledb.4.0;" + _
"Data Source=" + ThisWorkbook.Path + "\From Dyer.mdb;"
Set comm.ActiveConnection = conn
comm.CommandText = _
"SELECT Apps FROM track apps Where Month = June"
comm.Parameters(0) = ""
rec.Open comm
ws.[a1].CopyFromRecordset rec
rec.Close: conn.Close
End Sub
[code]
My code keeps stopping on teh comm.Parameters(0) = "" line.
What am I doing wrong?
I have posted this new snippet of code also in the Excel section. I need some quick answers here though, so I thought someone using Access everyday would know it quicker.
TIA
Have a great day!
Kurt