Question : Quick One: Type Mismatch Error in Access 2007

i am getting a type mmismatch in the following code. any ideas. looks correct to me ....

the error line is: Set rs = qdf.OpenRecordset

Code...
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
Private Function load_values(yearToLoad As String) As Double()
 
        Dim qdf As QueryDef
        Dim rs As Recordset
        Dim result(4) As Double
        
        Set conndb = CurrentDb
        Set qdf = conndb.QueryDefs!q_frm_AdjustPrice_Load     
        If (yearToLoad = "") Then
                qdf.Parameters![param_Year] = c_year.Value
        Else
                qdf.Parameters![param_Year] = yearToLoad
        End If
        qdf.Parameters![param_supplierID] = c_supplierlist.Value
        Set rs = qdf.OpenRecordset

Answer : Quick One: Type Mismatch Error in Access 2007

Not such a quick one....

With no options:
Set rs = CurrentDB.OpenRecordset("q_frm_AdjustPrice_Load")
Random Solutions  
 
programming4us programming4us