Knight of Nee
Board Regular
- Joined
- Aug 4, 2003
- Messages
- 124
hi the following module should perform a query hardcoded into my VBA project but for some reason it dosnt can somebody tell me whats wrong with it. it get a
i get a compile error user defined type not defined on the "Dim rs As DAO.Recordset" line. I am using access 2000 on xp
Thanks
Craig
Code:
Function JQuery(query As String) As String
On Error GoTo Fail
Dim rs As DAO.Recordset
Dim db As DAO.Database
Dim returnVal As String
Set db = CurrentDb
Set rs = db.OpenRecordset(query)
'clean up
returnVal = "" & rs(0)
rs.Close
Set rs = Nothing
Set db = Nothing
JQuery = returnVal
Exit Function
Fail:
MsgBox ("FAIL!")
End Function
i get a compile error user defined type not defined on the "Dim rs As DAO.Recordset" line. I am using access 2000 on xp
Thanks
Craig