Hello Everyone,
I would like to change this code to specifically get a month of code let's say June.
I also want to take out the input box.
Any suggestions?
TIA
Kurt
I would like to change this code to specifically get a month of code let's say June.
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"
'Month = InputBox("Please input the Month" & _
'"(for example, 'August').")
comm.Parameters(0) = ""
rec.Open comm
ws.[a1].CopyFromRecordset rec
rec.Close: conn.Close
End Sub
Any suggestions?
TIA
Kurt