SwordMonkey
MIS
OK, I'm a little stumped.
Here's the code:
Dim stDocName As String
stDocName = "rpt_rev_sum"
Dim db As Database
Dim dbf As QueryDef
Dim records As Recordset
Dim startdt As Date
Dim enddt As Date
Set db = CurrentDb()
Set dbf = db.QueryDefs("rpt_rev_sum"
dbf.SQL = "select distinct pd_no from deltek.rpt_rev_sum where fy_cd = '2003';"
'Set records = dbf.OpenRecordset -> THIS ONE IS FAILING
'DoCmd.OpenQuery stDocName, acNormal, acEdit -> THIS ONE WORKS
So this will open if i use the OpenQuery function, but I can't do OpenRecordset. It gives me: Type Mismatch. Any ideas?
Here's the code:
Dim stDocName As String
stDocName = "rpt_rev_sum"
Dim db As Database
Dim dbf As QueryDef
Dim records As Recordset
Dim startdt As Date
Dim enddt As Date
Set db = CurrentDb()
Set dbf = db.QueryDefs("rpt_rev_sum"
dbf.SQL = "select distinct pd_no from deltek.rpt_rev_sum where fy_cd = '2003';"
'Set records = dbf.OpenRecordset -> THIS ONE IS FAILING
'DoCmd.OpenQuery stDocName, acNormal, acEdit -> THIS ONE WORKS
So this will open if i use the OpenQuery function, but I can't do OpenRecordset. It gives me: Type Mismatch. Any ideas?