MakeQueryDef - error message
I've been trying to use the example on p. 253 of Beginning Access 2000 VBA on a db I'm working on and it gives me a user-type not defined error message. Has anyone had the same problem? and how did you solve it? Thank you much!
This is the code:
Function MakeQueryDef(strSQL as String) As Boolean
Dim qdf as QueryDef
If strSQL = " " Then Exit Function
Set qdf = CurrentDB.CreateQueryDef("qryExample")
qdf.SQL = strSQL
qdf.Close
RefreshDatabaseWindow
MakeQueryDef = True
End Function
|