D
Damion
Using Access 97. The following code is consistently
giving me a Type Mismatch error. Any explanation of why
would be most appreciated.
<begin sample code>
private sub MySub
dim db as database
dim qdef as QueryDef
dim rst as Recordset
set db = CurrentDB()
set qdef = db.QueryDefs("AQuery")
qdef.Parameters(0) = SomeValue
set rst = qdef.OpenRecordset()
'the next line causes a Type Mismatch.
'Execution never enters MyOtherSub.
MyOtherSub(rst)
end sub
private sub MyOtherSub(rs as Recordset)
end sub
giving me a Type Mismatch error. Any explanation of why
would be most appreciated.
<begin sample code>
private sub MySub
dim db as database
dim qdef as QueryDef
dim rst as Recordset
set db = CurrentDB()
set qdef = db.QueryDefs("AQuery")
qdef.Parameters(0) = SomeValue
set rst = qdef.OpenRecordset()
'the next line causes a Type Mismatch.
'Execution never enters MyOtherSub.
MyOtherSub(rst)
end sub
private sub MyOtherSub(rs as Recordset)
end sub