Record set parameter query problem

Carnafex

Registered User.
Local time
Today, 19:12
Joined
Jan 19, 2004
Messages
38
Just a quick question to see if any of you code gurus out there can solve this problem.
The code Ive written simply opens up a recordset from a parameter query, but unfortunatly the code chucks a Data type conversion error whenever I run it. The code is listed below:

Code:
Dim rstA As Recordset
Dim QDA1 As QueryDef

Dim tempID As Integer
tempID = Me![RepairID]

Set QDA1 = CurrentDb.QueryDefs![REP_RepairsQ_CT_A]
QDA1.Parameters(0) = tempID
Set rstA = QDA1.OpenRecordset("REP_RepairsQ_CT_A", dbOpenDynaset)

The problem occurs on the last line. As far as I can tell the tempID (which is simply an autonumber) isnt a data typed liked by the recordset. Ive tried various data types in the queries parameters to use, but every one chucks the error. Any help would be greatly appreciated.

Ta
Jason
 

Users who are viewing this thread

Back
Top Bottom