I have this excel macro pulling information from a specific record in Access. on the "open.strQstr" stmt I get "No value given for one or more required parameters"
Is there something i am missing
thanks
diane
_______________________________________________
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim PullDate As Date
Dim CurrentValue As Date
Dim StrQstr As String
Set cn = New ADODB.Connection
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=G:\\Prices.mdb;"
Set rs = New ADODB.Recordset
CurrentValue = ActiveCell.Value
StrQstr = "SELECT * from tblTriggerPrices WHERE fldDate = CurrentValue"
With rs
.Open StrQstr, cn, adOpenKeyset, adLockOptimistic, adCmdText
Range("a5").Value = .Fields(onpeak)
Range("b5").Value = .Fields(offPeak)
End With
Is there something i am missing
thanks
diane
_______________________________________________
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim PullDate As Date
Dim CurrentValue As Date
Dim StrQstr As String
Set cn = New ADODB.Connection
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=G:\\Prices.mdb;"
Set rs = New ADODB.Recordset
CurrentValue = ActiveCell.Value
StrQstr = "SELECT * from tblTriggerPrices WHERE fldDate = CurrentValue"
With rs
.Open StrQstr, cn, adOpenKeyset, adLockOptimistic, adCmdText
Range("a5").Value = .Fields(onpeak)
Range("b5").Value = .Fields(offPeak)
End With