I have set up a query that runs ok. I want to be able to modify it dynamically in vba to use it as a subform.
This is the code that produces the error.
Code:
Dim db As DAO.Database
Dim qdf As DAO.QueryDef
Dim strSQL As String
Set db = CurrentDb()
Set qdf = db.QueryDefs("qryGiftors”)
The final line, Set qdf = db.QueryDefs("qryGiftors”), turns red when the the error message pops up.
Compile Error: Expected: list separator or )
When I call the routine from the form the error message is
Compile Error: Syntax error
I would be grateful if someone can explain to me what is going wrong.