Query descriptions created in code
I used the below to try & create a temporary query that will be routinely created & deleted whenever it is called. The below code is meant to create it & append a description to the query in case sometime in the future I forget what it’s purpose is. Problem is that I get an invalid use of property message on the fourth line. I’d appreciate any advice.
Set db = CurrentDb
Set qd = db.CreateQueryDef("qryEnterPayDetails", strSQL)
db.QueryDefs("qryEnterPayDetails").Properties ("Test desc")
DoCmd.OpenQuery "qryEnterPayDetails"
I used the below to try & create a temporary query that will be routinely created & deleted whenever it is called. The below code is meant to create it & append a description to the query in case sometime in the future I forget what it’s purpose is. Problem is that I get an invalid use of property message on the fourth line. I’d appreciate any advice.
Set db = CurrentDb
Set qd = db.CreateQueryDef("qryEnterPayDetails", strSQL)
db.QueryDefs("qryEnterPayDetails").Properties ("Test desc")
DoCmd.OpenQuery "qryEnterPayDetails"