
HELP! Using queries w/ Data cotrol
Quote:
>Hello:
>I have a data control which I need to assign a query record set ,and I'm
>using the example in the vb 4 help file, I ger error #3061, too few
>parameters, expected 2...... This is the code:
>Set Qd = Data1.Database.QueryDefs("StoredQuery")
>Qd.Parameters!temTyp = 1
>Qd.Parameters!ItemNo = "A"
>Set Rs = Qd.OpenRecordset()
>Set Data1.Recordset = Rs
>Data1.Refresh
>What is the problem? HELP!!!!!!!!!!
Hello Silvio,
You do not need to do the data1.Refresh, as you have already opened
the recordset with Set Rs = Qd.OpenRecordset() statement.
Alan Davis, Southampton, England