Link to home
Start Free TrialLog in
Avatar of PeterBaileyUk
PeterBaileyUk

asked on

populate excel worksheet from qdf.openrecordset

I have passed parameters to a query in access and I now want to populate a worksheet with the values (rows) from that qdf.OpenRecordset but not sure how

      qdf.Parameters("[Yes=CW Codes/No=SMMT Codes]").Value = codetype
        qdf.Parameters("[Enter Cars, Bikes, Lcv, Others]").Value = VehicleCat
        qdf.Parameters("[Yes=Matched Abi/No=No Match Abi]").Value = True
        qdf.Parameters("[Yes=Matched Cap/No=No Match Cap]").Value = Null
        qdf.Parameters("[Yes=Matched Glass/No=No Match Glass]").Value = Null
        qdf.Parameters("[Yes=Matched Adl/No=No Match Adl]").Value = Null
        qdf.Parameters("[Yes=Matched Insecom/No=No Match Insecom]").Value = Null
        qdf.Parameters("[Yes=Matched Techdoc/No=No Match Techdoc]").Value = Null
        qdf.Parameters("[Yes=Matched Halfords/No=No Match Halfords]").Value = Null
        qdf.Parameters("[Yes=Matched Kee/No=No Match Kee]").Value = Null
        qdf.Parameters("[Yes=Matched Vivid/No=No Match Vivid]").Value = Null
        qdf.Parameters("BYM") = SelectedMonth

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Rory Archibald
Rory Archibald
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PeterBaileyUk
PeterBaileyUk

ASKER

how can i clear the range before i grab the recordset to clear previous recordsets?
Range("a2").currentregion.clearcontents

should do it.